I'm just starting to work in Xcode and trying to get my (C++) command-line application (Mac OS X target) to include its own dynamic libraries for OpenCV so that I can deploy to other people's computers and it'll find them properly (without their computers needing to have OpenCV installed). But it's not looking anywhere except where they live on my computer (/opt/local/lib).
When the executable runs on another system, it throws errors like this:
dyld: Library not loaded: /opt/local/lib/libopencv_core.2.3.dylib Referenced from: /Users/editc/Desktop/edge_display/edge_display Reason: image not found
(Note that this is despite the fact that libopencv_core.2.3.dylib is included in the same directory as the executable.)
How do I get it to look in the application's own directory? Adding "./" to the library search paths seems to do nothing.
Several searches have indicated that it should look in the Frameworks/ directory of its app bundle, but it's not generating an .app bundle for some reason, so even when I change the Installation Directory and add a file copy step like described in this thread, since I don't have an app bundle, I don't have a Frameworks directory. So with no app bundle, this technique isn't working. (I'm not sure I even understand under what conditions an app bundle is generated or not.)
My project is here, for your reference. Can anyone help? I'm still getting my feet wet in Xcode and Mac OS X development in general, so apologies in advance if this question seems neophytic.