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

TastyCocoa

macrumors newbie
Original poster
Mar 21, 2011
13
0
Tldr
Boost dylibs are not linking to my xcode project properly. I have no idea why.



I realise this is something of a problem on the internet, but after 45 minutes of googling I haven't found a solution to my problem.

Okay - so I'm trying to link in the boost filesystem library to my Xcode 4.1 project. So far I've unpacked and installed the boost libraries, and linked to them through my header and search paths in xcodes build settings.

So, if I try to compile the program at this point I get linker errors, cannot find boost etc. Linking to the static boost libraries (for example boost::rand) works fine. So it must be the dynamic libraries that are the problem.

If I drag and drop the dylibs from the boost install directory into the build phases box the project compiles fine, but I get symbol errors when I run the program (which I have gleaned means that there are still linker errors).

Any help anyone can provide would be really appreciated.
 
Post the complete text of all error messages.

What OS version are you using?

Have you tried finding and building a known-good program that uses Boost? Anything open-source that actually works should suffice.
 
I should have mentioned that what I'm trying to compile is the first boost::filesystem example off the boost website

The error messages I get when I run the program are
warning: Unable to read symbols for libboost_filesystem.dylib (file not found).
warning: Unable to read symbols from "libboost_filesystem.dylib" (not yet mapped into memory).
warning: Unable to read symbols for libboost_system.dylib (file not found).
warning: Unable to read symbols from "libboost_system.dylib" (not yet mapped into memory).

I've got the whole thing working through the command line and with a makefile (after figuring out that I need to set an appropriate DYLD_LIBRARY_PATH variable), but getting it working in XCode is still eluding me.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.