Error link of '.mexw64' failed

1 view (last 30 days)
Aravind Kota
Aravind Kota on 25 Mar 2019
Commented: Jan on 25 Mar 2019
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.

Answers (1)

Jan
Jan on 25 Mar 2019
What about:
mex generateEllipseCandidates.cpp libmwlapack.lib libmwblas.lib ...
and omit "-lC:/MATLAB/R2013a/extern/lib/win64/libmwlapack.dll"
  2 Comments
Aravind Kota
Aravind Kota on 25 Mar 2019
I have tried omitting the lib path, but i am unable to create the mex file. I am getting the following error.
Kindly help.
Thanks in advance.
Creating library C:\Users\asus\AppData\Local\Temp\mex_CLBrX9\templib.x and object C:\Users\asus\AppData\Local\Temp\mex_CLBrX9\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.
Error using mex (line 206)
Unable to complete successfully.
Jan
Jan on 25 Mar 2019
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!