필터 지우기
필터 지우기

I get an LNK2019 unresolved external symbol when building in Visual Studio 2017

조회 수: 20 (최근 30일)
Reid
Reid 2022년 5월 27일
답변: Animesh 2023년 10월 4일
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