Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X compilation error #40

Open
ShuoYangRobotics opened this issue Apr 18, 2013 · 4 comments
Open

Mac OS X compilation error #40

ShuoYangRobotics opened this issue Apr 18, 2013 · 4 comments

Comments

@ShuoYangRobotics
Copy link

Mac
Unix
Undefined symbols for architecture x86_64:
"cvAlloc", referenced from:
mexFunction in lk.o
"cvCalcOpticalFlowPyrLK", referenced from:
mexFunction in lk.o
"cvCreateImage", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f
, int, char
, float
, int, int)in lk.o
mexFunction in lk.o
"cvGetRectSubPix", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f
, int, char
, float_, int, int)in lk.o
"cvMatchTemplate", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f_, int, char_, float_, int, int)in lk.o
"cvReleaseImage", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f_, int, char_, float_, int, int)in lk.o
_mexFunction in lk.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

mex: link of ' "lk.mexmaci64"' failed.

Error using mex (line 206)
Unable to complete successfully.

Error in compile (line 77)
eval(['mex lk.cpp -O' include lib]);

@groakat
Copy link

groakat commented May 25, 2015

I run into the same problem. It is a strange Matlab behaviour, in my case it is trying to compile both, the mac and the unix version because isunix is true for OSX as well. If you change line 64 from

 if isunix

to

if isunix && ~ismac

it might work.

@zli54
Copy link

zli54 commented Jul 1, 2015

I tried @groakat methods, it didn't work for me. Anyone has other methods?

@groakat
Copy link

groakat commented Jul 1, 2015

Do you get any error?

@zli54
Copy link

zli54 commented Jul 2, 2015

@groakat , I set the lib path wrongly :P, now it works. Thank you~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants