On Nov 9, 2009, at 9:54 PM, Keren Lasker wrote:
> Daniel - thanks. It turned out that I did not include imp_misc in my > linked libs. probably easier installing imp ... I didn't think you should have to include imp_misc directly if the symbols are only referenced through imp_helper and you are doing dynamic linking on linux. It should pull it in automatically as long as the directory is in your linking rpath or your LD_LIBRARY_PATH. That is g++ main.cc -limp_helper -Lpath/to/libs -Wl,-rpath,path/to/libs will work, but if you leave off the rpath it will not.
> On Nov 9, 2009, at 6:49 PM, Daniel Russel wrote: > >> >> On Nov 9, 2009, at 6:21 PM, Keren Lasker wrote: >> >>> hi, >>> >>> Compiling an external exe, I am getting an error in the linkage >>> stage, basically saying that helper can not see misc: >>> /usr/bin/ld: warning: libimp_misc.so, needed by /viola1/home/ >>> kerenl/bioinformatics/projects/imp/build/lib/libi\ >>> mp_helper.so, not found (try using -rpath or -rpath-link) >>> /viola1/home/kerenl/bioinformatics/projects/imp/build/lib/ >>> libimp_helper.so: undefined reference to `IMP::misc:\ >>> :get_module_version_info()' >>> /viola1/home/kerenl/bioinformatics/projects/imp/build/lib/ >>> libimp_helper.so: undefined reference to `IMP::misc:\ >>> :LowestRefinedPairScore::LowestRefinedPairScore(IMP::Refiner*, >>> IMP::PairScore*)' >>> collect2: ld returned 1 exit status >>> scons: *** [bin/clustering_coefficient] Error 1 >> How are you linking against imp_helper? How did you tell your >> executable to find imp misc/helper? Do you set the rpath in your >> executable or use imppy.sh? Is misc in the same dir as helper? >> >> If you just passed the full path to imp helper to the link call for >> the exe then the compiler has no way to find other libraries. You >> should link as is done by binaries created within (say benchmarks/ >> bin) and either >> - run everything using imppy.sh >> - or install imp in some place and add that place to your >> LD_LIBRARY_PATH and link search path >> >> >>> I tried changing the dependency order in the SCons files, but did >>> not succeed - can someone help ? >> Link order only matters for static linking. >> ] >> _______________________________________________ >> IMP-dev mailing list >> IMP-dev@salilab.org >> https://salilab.org/mailman/listinfo/imp-dev > > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev