Denis Tkachov wrote:
Hi all
I am having problem starting my application that is successfully built. I am
using boost to serialize/deserialize data. I have link boost library and my
project is built successfully, but I cannot run it.
Running the project (build&go in xcode) I receive this error:
dyld: Library not loaded: stage/lib/libboost_serialization-1_34_1.dylib
Referenced from:
/Users/dtsachov/dev/evdp/temp/TestSerialization/build/Debug/TestSerialization
Reason: image not found
Note - that is not a problem with boost, that is some problem with linking
to the library in runtime. I had the same problem with my 2 projects, one
uses another - one is a command line tool and another is a library. If the
library is dynamic library I am able to build the project but unable to run
it, getting the same error. When I made my library static as library (not
dynamic) I can run the application.
So I suggest this is some problem of locating the library in runtime.
Does anybody have an idea ?
You might set your DYLD_LIBRARY_PATH to point to your built lib?
with tcsh:
'setenv DYLD_LIBRARY_PATH /path-to-your-lib:$DYLD_LIBRARY_PATH'
Given that you already have a DYLD_LIBRARY_PATH, otherwise leave the
post $DYLD_LIBRARY_PATH.
Andreas