This is the mail archive of the
mailing list for the GCC project.
Re: Library not loaded
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Denis Tkachov <denys_tkachov at mail dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 16 Oct 2007 22:42:40 +0200
- Subject: Re: Library not loaded
- References: <firstname.lastname@example.org>
Denis Tkachov wrote:
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
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?
'setenv DYLD_LIBRARY_PATH /path-to-your-lib:$DYLD_LIBRARY_PATH'
Given that you already have a DYLD_LIBRARY_PATH, otherwise leave the