I get an LNK2019 unresolved external symbol when building in Visual Studio 2017
9 views (last 30 days)
Show older comments
I am trying to build my code in Visual Studio 2017 so I can use it to debug my mex code. I updated from matlab 2019b to 2021b and now I am getting LNK2019 unresolved external symbol mxGetData_800 refrenced in funciton mexFunction (and other similar errors) that I did not get before. I have updated the path to my include directoreis C:\Program Files\MATLAB\R2021b\extern\include and Library Directories C:\Program Files\MATLAB\R2021b\extern\lib\win64\microsoft, but I am still getting this error
0 Comments
Answers (1)
Animesh
on 4 Oct 2023
Hello Reid,
According to my understanding, you are getting an error due to a reference to a function that the linker couldn't resolve.
You can try passing the libraries using the -l and -L flags.
Example:-
mex '-LC:\Program Files\MATLAB\R2014a\extern\lib\win64\microsoft' ...
-llibmwlapack matrixDivide.c
To read more about Mex Functions, please refer to the following documentation: - https://www.mathworks.com/help/matlab/ref/mex.html
0 Comments
See Also
Categories
Find more on MATLAB Compiler 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!