Linking with OpenCV in XCode
libhighgui.2.0.0.dylib
libhighgui.2.dylib
libhighgui.dylib
libhighgui.la
libcv.2.0.0.dylib
libcv.2.dylib
libcv.dylib
libcv.la
libcxcore.2.0.0.dylib
libcxcore.2.dylib
libcxcore.dylib
libcxcore.la
I tried dragging some of these into the XCode project, but it didn't change any of the linker errors.
Let me say----I'm not a big fan of XCode's approach to library specification (drag and drop something into the project). That's a useful feature, but there really needs to be a good old g++ style "input libraries" setting somewhere. I tried to use the Other Linker Flags field:
-lcv -lcxcore -lhighgui
but that didn't seem to help.
I'm aware that there's a prebuilt OpenCV Private Framework:
http://opencv.willowgarage.com/wiki/MacOS_X_OpenCVPort
but as I understand it, a private framework doesn't help at all with a C++ Command-Line Tool.
The errors I'm getting are all of the form:
Line Location Tool:0: "_cvLoadImage", referenced from:
Line Location Tool:0: "_cvGetSize", referenced from:
Line Location Tool:0: "_cvGet2D", referenced from:
etc. Note that the places they're referenced from are not sequentially given after these lines....they're all clumped together at the top. XCode bug I bet.
Here's the really curious part. When I build in Debug configuration, everything works fine---the program runs as expected, no difficulties. Only in the Release configuration does this occur. I really want to test my program optimized, however.....
Frankly at this point, I'm considering just building with g++. I think it might be less frustrating.
MacBook Pro, Mac OS X (10.5.6), .