Four unresolved external symbol when generating static library for function "pcdownsample"
Show older comments
Steps to reproduce:
1. Write simple function which just wrap a call to the cv toolbox function "pcdownsample"

2. Write a simple script that calls the function. The script refered to the first example of the help page of the "pcdownsample".

3. Use Coder app, specify "mypcdownsample" as the function to be translated, specify "run_mypcdownsample" as the running code to define input types. Modify the input type to "inf×3" and choose c++ static library as the wanted build type. Select "vs 2019 project | cmake 64-bit" as the toolchain. Below are snapshots of the matlab coder:


4. Open the sln, create a new project, add the auto-generated example files(main.h main.cpp) to this project. Replace the trivial init function with my own correct function which reads the "teapot.txt" file. Also add some folders to the "additional include directories" so that vs could find the headers.

5. Build the solution. VS complained about "unresolved external symbol", both in "debug" and "release" mode.


Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
