Four unresolved external symbol when generating static library for function "pcdownsample"
显示 更早的评论
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.


采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

