library query

Edward Moyse edward.moyse at cern.ch
Tue Jul 22 15:40:56 BST 2003


Hi, 

I have a project that I'd like to work on using Kdevelop 2.1.5, which needs to 
use lots of external libraries.

The following works okay (where `root-config --cflags returns : -D_REENTRANT 
-I/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/include )

g++ -c -fPIC `root-config --cflags` AnalysisConfig.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigL1.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigL2Calo.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigL2IDandIDCalo.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigEFCalo.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigEFID.C
g++ -c -fPIC `root-config --cflags` AnalysisConfigEFIDCalo.C
g++ -c -fPIC `root-config --cflags` TextOutput.C
g++ -c -fPIC `root-config --cflags` Level1.C
g++ -c -fPIC `root-config --cflags` Level2Calo.C
g++ -c -fPIC `root-config --cflags` Level2IDandIDCalo.C
g++ -c -fPIC `root-config --cflags` EventFilterCalo.C
g++ -c -fPIC `root-config --cflags` EventFilterID.C
g++ -c -fPIC `root-config --cflags` EventFilterIDCalo.C
g++ -c -fPIC `root-config --cflags` Analysis.C

echo "Creating library libAnalysis.so"
ld -G *.o -o libAnalysis.so

I've imported all the files into a new C++ kdevelop project, and placed them 
in a separate directory (analysis) , so they are built as a shared library.

Adding:

" -D_REENTRANT -I/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/include" to 
the CPPFLAGS (C preprocessor flags in "options->Flags and Warning") and 

"-r dynamic -L/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/lib" to 
"Options->Linker Flags ->additional flags"  and

" -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript 
-lMatrix -lPhysics -lpthread -ldl" to "Linker Options->Additional libraries)

allows it to compile okay but running a simple main.cpp, which only #includes 
"analysis/Analysis.h" gives the following error:

lt-root: error while loading shared libraries: libCore.so: cannot open shared 
object file: No such file or directory


Can anyone help? I'm really stuck! The file libCore.so is definitely in  
/afs/cern.ch/sw/root/v3.05.05/rh73_gcc296/root/lib!

Cheers,

Ed


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list