Boost logo

Boost-Build :

Subject: Re: [Boost-build] linking to serialization
From: er (erwann.rogard_at_[hidden])
Date: 2009-11-06 21:36:07


Vladimir Prus wrote:
> On Tuesday 03 November 2009 er wrote:
>
>> Hi All, I use Mac OS X 10.6. After following the ./bootstrap.sh and bjam
>> install steps, I have directory like this:
>>
>> ~/Library/boost_library/boost_1_40_0/include
>> ~/Library/boost_library/boost_1_40_0/lib/
>> libboost_serialization.a
>> libboost_serialization.dynlib
>>
>> and have the include directory path to Project > Build > Search path >
>> Header Search Paths and and the lib directory path to Project > Build >
>> Search path > Library Search Paths.
>>
>> In XCode I did Project > Add to project > libboost_serialization.a
>>
>> Running under Debug generates this message:
> ...
>> dyld: Library not loaded: libboost_serialization.dylib
>> Referenced from:
>> ~/projets/2009/Xcode/myproject/build/Debug/distribution_survival
>> Reason: image not found
>
> I suspect this message means that you need to add
> ~/Library/boost_library/boost_1_40_0/lib/ to the runtime libraries path.
>
> On command line, this can be done via the DYLD_LIBRARY_PATH variable,
> e.g.
>
> set DYLD_LIBRARY_PATH=~/Library/boost_library/boost_1_40_0/lib/:$DYLD_LIBRARY_PATH
>
> you might want to manually expand ~ to your home directory above -- I don't know
> how OSX shell behaves here.
>
> I also don't know how to do this in XCode -- I suggest you first try running the
> binary on the command line, with the above variable setting, and if it works,
> check the XCode manual for a comparable setting.
>
> - Volodya
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>

Thanks, but it hasn't worked. Note that I did replace ~ by it's expanded
version but $env does not show DYLD_LIBRARY_PATH : is it supposed to?

First, I don't see why it's looking for dyn library if I add
libboost_serialization.a to the project, not
libboost_serialization.dynlib (even if I reverse their roles I still get
the same linking error message as above).

I found this but have yet to make sense of it.

http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CAcQFjAA&url=http%3A%2F%2Flists.apple.com%2Farchives%2Fxcode-users%2F2009%2Faug%2Fmsg00174.html&ei=U9X0SoGGC9Pd8Qa__cDzCQ&usg=AFQjCNESeXf7FSClsOlmrV8sec0Q3cfP1w&sig2=QSYBK3wvb30j9v-BJpySCg


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk