Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sinser

macrumors 6502a
Original poster
Sep 16, 2003
549
0
Has someone been able to build OpenCv on Mac Os X Lion ? I have tried using homebrew but I get the following linking error


Linking CXX shared library ../../lib/libopencv_highgui.dylib
Undefined symbols for architecture x86_64:
"_png_set_gray_1_2_4_to_8", referenced from:
cv::pngDecoder::readData(cv::Mat&) in grfmt_png.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [lib/libopencv_highgui.2.3.1.dylib] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
 
You seem to have gotten further than me building opencv 2.2.0 using macports 2.0.3 on Lion 10.7.1 with clang 3.0.

I failed at:

[ 59%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_cocoa.o

With errors in core/core.hpp.

EDIT: Some research on my case revealed that the issue I'm getting is caused by XCode 4.2 beta. It doesn't appear in XCode 4.1. Also seems opencv 2.3 also doesn't have this problem

You may be interested in this: How to get OpenCV working under Mac OS X Lion with XCode 4.1
 
Last edited:
Yes, I could try macports approach, even if I just was trying to switch to homebrew. I think both packages have problems to coexist.
Here it looked so simple :-(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.