Introjucer to Xcode's Link Binary With Libraries


#1

I have some .dylibs that I add to my Xcode project using Xcode’s Build Phases -> Link Binary With Libraries list. Everytime I edit my project these changes are lost.

The libs are in my /opt/local/lib folder. I’ve tried adding the path to Introjucer’s “Extra library search paths” and the file names to “External libraries to link”. I’ve also tries adding the whole path to “External libraries to link”. That doesn’t seem to correspond to Xcode’s “Link Binary With Libraries”.

anyone have a tip how to properly reference these dylib files in Introjucer?


#2

But dylibs don’t get linked into an executable… (?) You should be linking to the static lib that represents whatever this dylib is, not the dylib itself.


#3

Thanks for the feedback. I’m new to C++ and not sure how to properly reference and link dependencies.

I’m working on a school project that needs to use the MPI and Boost MPI libraries. Adding the names of the library to “External libraries to link” rather than the name of the .dylib files worked.

I had listed:
libboost_mpi.dylib
libboost_serialization.dylib

When it should have been:
boost_mpi
boost_serialization

Compiling on Xcode works now.