Error link of '.mexw64' failed
5 次查看(过去 30 天)
显示 更早的评论
Hi
I am getting the following error while running the mex command
mex generateEllipseCandidates.cpp -IC:\opencv\sources\include -IC:\opencv\sources\include\opencv -IC:\opencv\sources\include\opencv2 -LC:\opencv\build\x64\vc10\lib -IC:\MATLAB\R2013a\settlein\extern\include -LC:\MATLAB\R2013a\settlein\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -lC:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll
Warning: MEX could not find the library "C:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll" specified with -l option.
MEX looked for a file with one of the names:
C:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll.lib
libC:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll.lib
MEX looked for the library in the following directories:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB\amd64
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\amd64
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\x64
C:\MATLAB\R2013a\extern\lib\win64
C:\MATLAB\R2013a\extern\lib\win64\microsoft
C:\opencv\build\x64\vc10\lib
C:\MATLAB\R2013a\settlein\extern\lib\win64\microsoft
Creating library C:\Users\asus\AppData\Local\Temp\mex_CGWo6Q\templib.x and object C:\Users\asus\AppData\Local\Temp\mex_CGWo6Q\templib.exp
generateEllipseCandidates.obj : error LNK2019: unresolved external symbol dggev referenced in function "int __cdecl fitEllipse(struct point2d *,int,double *)" (?fitEllipse@@YAHPEAUpoint2d@@HPEAN@Z)
generateEllipseCandidates.mexw64 : fatal error LNK1120: 1 unresolved externals
C:\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'generateEllipseCandidates.mexw64' failed.
Kindly help me solve this.
0 个评论
回答(1 个)
Jan
2019-3-25
What about:
mex generateEllipseCandidates.cpp libmwlapack.lib libmwblas.lib ...
and omit "-lC:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll"
2 个评论
Jan
2019-3-25
Did you consider my suggestion? My code does not "omit the lib path", but add the library explicitely. Please post, which command produces the show error message.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!