Mex error LNK2019 during compiling sba library

1 view (last 30 days)
Hi
during compiling sba (sparse bundle adjustment) library in Windows 64 bit by makefile as
mex -largeArrayDims -I .. -O sba.c ../sba.lib C:/CLAPACK/lib/lapackd.lib C:/CLAPACK/lib/blasd.lib C:/CLAPACK/lib/libf2cd.lib
It fails to output sba.mexw64 with errors below:
sba.obj : error LNK2019: unresolved external symbol sba_motstr_levmar referenced in function mexFunction sba.obj : error LNK2019: unresolved external symbol sba_mot_levmar referenced in function mexFunction sba.obj : error LNK2019: unresolved external symbol sba_str_levmar referenced in function mexFunction sba.mexw64 : fatal error LNK120: 3 unresolved externals
...
Can anybody solve this problem?
  2 Comments
Ken Atwell
Ken Atwell on 10 Apr 2014
This looks okay to me, assuming you got your paths right. What version of MATLAB are you using? This is a stab in the dark, but maybe try "rephrasing" you library references:
>> mex -largeArrayDims -I .. -O sba.c -L.. -LC:\CLAPACK\lib sba.lib lapackd.lib blasd.lib libf2cd.lib
Shahab Askarian
Shahab Askarian on 14 Jul 2016
hi, It doesn't work with MATLAB R2016a.
Error is:
Unknown MEX argument '-I'.

Sign in to comment.

Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!