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

回答(1 个)

Animesh
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

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by