zk00006 / OpenTLD

OpenTLD is an open source library for real-time 2D tracking of a single object in video. This repository is no longer under development. For latest version see: http://www.tldvision.com/tld2.html
GNU General Public License v3.0
2.09k stars 1.27k forks source link

Mac OS X compilation error #40

Open ShuoYangRobotics opened 11 years ago

ShuoYangRobotics commented 11 years ago

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 commented 9 years ago

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 commented 9 years ago

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

groakat commented 9 years ago

Do you get any error?

zli54 commented 9 years ago

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