Why does compiling code, generated for "detectFASTFeatures", result in a linker error?

I am attempting to compile some files in Visual Studio 2019 which were generated for "detectFASTFeatures" using MATLAB Coder. We have also used the "PackNGo" feature to ensure we have all of the necessary files for compilation within Visual Studio.
 
When attempting to compile in Visual Studio, I receive the following error message: 
LNK2019 unresolved external symbol detectFAST_compute referenced in function detectFASTFeatures LNK2019 unresolved external symbol detectFAST_assignOutput referenced in function detectFASTFeatures LNK2019 unresolved external symbol extractFreak_compute referenced in function extractFreakFeatures LNK2019 unresolved external symbol extractFreak_assignOutput referenced in function extractFreakFeatures LNK1120 4 unresolved externals
I have included all of the necessary dependencies in Additional Dependencies, Additional Library Directories, and Additional Include Directories in the project properties in Visual Studio. Why is this error occurring?

 Accepted Answer

Since "detectFASTFeatures" uses prebuilt OpenCV libraries, these libraries are not configured for debugging. The Visual Studio project needs to be configured to build in release mode rather than debug mode. 
If this does not solve your issue, check that all of the necessary dependencies have been included in the project. 

More Answers (0)

Products

Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!