I get an LNK2019 unresolved external symbol when building in Visual Studio 2017
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Animesh
2023-10-4
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!