problem in dynamic library*.so


 
Thread Tools Search this Thread
Top Forums Programming problem in dynamic library*.so
# 1  
Old 05-14-2013
problem in dynamic library*.so

hello
I apologize if my question bothers you
I work on a code developed in C + + which worked well on mac os, this code will help create libraries *.so from *.cc and *.h I used this as flags:CXXFLAGS = -g -O2 -fPIC -Wall -ldl -D_GNU_SOURCE ,CXX := g++ and $(CXX)-shared -o $(LIBNAME) $(CLIBLIB) $(OUT_OBJS)this step is fine I got the *.so as follows. :
*****************************************
Code:
morad@linux-nzlc:~/Musique/workdir> ls library/tklibs/lib/
libAnalyticalJacobians.so libDetGeometry.so libGeomPropagators.so libPatternTestTools.so libSmearingClusterizers.so libTkLayout.so
libBaseMagneticField.so libDetLayout.so libKalmanUpdators.so libPatternTools.so libStatUtilities.so libTkNavigation.so
libBasicDet.so libDetUtilities.so libMaterialEffects.so libPropagators.so libSurfaceGeometry.so libTrackFitters.so
libBasicStripDet.so libDetVolumeGeometry.so libNumericalJacobians.so libRKPropagators.so libTkCommonDet.so libTrajectoryParametrization.so
libCommonStripDet.so libGenUtil.so libPatternPrimitives.so libSiPixelDet.so libTkFastSimHit.so libUI.so
morad@linux-nzlc:~/Musique/workdir>
*****************

then the second step I would create the executable for that I specify the-I,-L and-l in makfile I as flags:CXX = g++ and $(CXX) -O2 -g -fopenmp $(CILIBLAY) $(OUT_OBJS) $(OBJDIR)/$(MAIN_PROG).o -o $(MAIN_PROG).exe but after running it I get an error:
***************************************
Code:
morad@linux-nzlc:~/Musique/workdir/layout/analyze> make mainP=runAnalyze
Makefile:85: /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d: Aucun fichier ou dossier de ce type
g++ -MM -I/cern/CLHEP/2.0.4.5/include/ -I/home/morad/Musique/workdir/layout -I/home/morad/Musique/workdir/library/tklibs -I/cern/ROOT/source/root/include -I/usr/include/freetype2/freetype/ -I/usr/include/freetype2 -I/cern/Minuit2/5.28.00/include -I/usr/include/libxml2 -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include/ -I/usr/include/glibmm-2.4/ -I/usr/lib/glibmm-2.4/include/ -I/usr/include/sigc++-2.0/ -I/usr/lib/sigc++-2.0/include/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/ -I/cern/gettext/0.18.2/include/ myAnalyze.cc > /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d.$$; \
sed 's,\(myAnalyze\)\.o[ :]*,\1.o /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d : ,g' < /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d.$$ > /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d; \
rm -f /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.d.$$
g++ -c -I/cern/CLHEP/2.0.4.5/include/ -I/home/morad/Musique/workdir/layout -I/home/morad/Musique/workdir/library/tklibs -I/cern/ROOT/source/root/include -I/usr/include/freetype2/freetype/ -I/usr/include/freetype2 -I/cern/Minuit2/5.28.00/include -I/usr/include/libxml2 -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include/ -I/usr/include/glibmm-2.4/ -I/usr/lib/glibmm-2.4/include/ -I/usr/include/sigc++-2.0/ -I/usr/lib/sigc++-2.0/include/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/ -I/cern/gettext/0.18.2/include/ myAnalyze.cc -o /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.o 
g++ -c -I/cern/CLHEP/2.0.4.5/include/ -I/home/morad/Musique/workdir/layout -I/home/morad/Musique/workdir/library/tklibs -I/cern/ROOT/source/root/include -I/usr/include/freetype2/freetype/ -I/usr/include/freetype2 -I/cern/Minuit2/5.28.00/include -I/usr/include/libxml2 -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include/ -I/usr/include/glibmm-2.4/ -I/usr/lib/glibmm-2.4/include/ -I/usr/include/sigc++-2.0/ -I/usr/lib/sigc++-2.0/include/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/ -I/cern/gettext/0.18.2/include/ runAnalyze.cxx -o /home/morad/Musique/workdir/layout/build/analyze/runAnalyze.o
g++ -O2 -g -fopenmp -L/home/morad/Musique/workdir/library/tklibs/lib -L/home/morad/Musique/workdir/layout/lib -lxmlgeom -ltrack -lcross -lMaterialEffects -lPropagators -ltracking -lgeom -lStatUtilities -lAnalyticalJacobians -ltkhist -lxmltkgeom -lutils -lopt -ldraw -lanalyze -L/usr/lib -lGeomPropagators -lPatternPrimitives -lSurfaceGeometry -lBaseMagneticField -lUI -lGenUtil -lSiPixelDet -lSmearingClusterizers -lBasicDet -lTrackFitters -lTkFastSimHit -lCommonStripDet -lDetLayout -lTkLayout -lDetGeometry -lKalmanUpdators -lTkCommonDet -lPatternTools -lTrajectoryParametrization -lBasicStripDet -lDetUtilities -lDetVolumeGeometry -lPatternTestTools -lRKPropagators -lTkNavigation -lNumericalJacobians -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lglib-2.0 -L/cern/ROOT/source/root/lib -L/cern/Minuit2/5.28.00/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lfreetype -lz /usr/lib/libbz2.so.1.0.6 -lpthread -lm -ldl -lMinuit2 -L/cern/CLHEP/2.0.4.5/lib/ -lCLHEP-2.0.4.5 /usr/lib/libstdc++.so.6 /home/morad/Musique/workdir/layout/build/analyze/myAnalyze.o /home/morad/Musique/workdir/layout/build/analyze/runAnalyze.o -o runAnalyze.exe
/home/morad/Musique/workdir/library/tklibs/lib/libSmearingClusterizers.so: undefined reference to `TrivialROUSetter::set(Module)'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `FixTIDTopology::recreateTopologies()'
/home/morad/Musique/workdir/library/tklibs/lib/libSmearingClusterizers.so: undefined reference to `TkDetTypeName::shortName(DetType const&)'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `DetUnitGluer::glue(__gnu_cxx::__normal_iterator<DetUnit**, std::vector<DetUnit*, std::allocator<DetUnit*> > >, __gnu_cxx::__normal_iterator<DetUnit**, std::vector<DetUnit*, std::allocator<DetUnit*> > >, __gnu_cxx::__normal_iterator<DetUnit**, std::vector<DetUnit*, std::allocator<DetUnit*> > >, __gnu_cxx::__normal_iterator<DetUnit**, std::vector<DetUnit*, std::allocator<DetUnit*> > >)'
/home/morad/Musique/workdir/library/tklibs/lib/libTkFastSimHit.so: undefined reference to `RawHepEventFactoryFromGun::RawHepEventFactoryFromGun()'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `toa::operator()(int const&) const'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `FixTIDTopology::FixTIDTopology()'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `DetBlade::DetBlade(__gnu_cxx::__normal_iterator<Det* const*, std::vector<Det*, std::allocator<Det*> > >, __gnu_cxx::__normal_iterator<Det* const*, std::vector<Det*, std::allocator<Det*> > >)'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `toa::~toa()'
/home/morad/Musique/workdir/library/tklibs/lib/libTkLayout.so: undefined reference to `FullTracker::instance()'
collect2: erreur: ld a retourné 1 code d'état d'exécution
make: *** [runAnalyze] Erreur 1
morad@linux-nzlc:~/Musique/workdir/layout/analyze>

*****************************************
which is not defined in *.so for example TrivialROUSetter is only declared in a file.h is not defined in file.cc I have a hunch that the g+ + compiler for opensuse needs a flags for is seeking definitions includes *. h if it is necessary unlike g+ + mac-os
thank you in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Specifying dynamic library path to linker at compile time

I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great. But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies

2. Linux

./configure problem for libsf library due to apparently missing libdb library.

Hello, ./configure script fails to configure libsf. Please check the following last few lines of configure script error. checking for db1/db.h... no checking for db.h... yes checking for dbopen in -ldb1... no configure: error: No libdb? No libsf. But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies

3. Programming

Dynamic library load with dlopen

Hi, I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum. In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies

4. UNIX for Dummies Questions & Answers

Problem with shared dynamic library files

I am having a major problem. Most of the commands that i am running on my centos 5 system is giving the error of type: <dynamic shared library file>:open failed: No such file or directory For example: libgcc_s.so.1: open failed: No such file or directory How can i solve this? (6 Replies)
Discussion started by: proactiveaditya
6 Replies

5. UNIX for Dummies Questions & Answers

How to obtain list of object files in a shared (dynamic) library?

How can I simply obtain a list of the object files in a shared (dynamic) library. I am looking for the equivalent of "ar -t <lib>" for archived (static) libraries. Thanks in advance. :rolleyes: ---------- Post updated at 01:47 PM ---------- Previous update was at 12:16 PM ---------- The... (1 Reply)
Discussion started by: chatieremerrill
1 Replies

6. Programming

overriding the dynamic library

Hi, I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols. Is it possible to do. Cheers. (4 Replies)
Discussion started by: Raom
4 Replies

7. Programming

loading a dynamic library in linux

is there a way to load a dynamic library in linux? I know tht in AIX u can do it using the loadAndInit() function. Please guide me (2 Replies)
Discussion started by: jacques83
2 Replies

8. Linux

load dynamic and shared library in kernel

hi how can i load dynamic or shared library in linux kernel modules . mtaghiloo@yahoo.com (0 Replies)
Discussion started by: mtaghiloo
0 Replies

9. Shell Programming and Scripting

Dynamic Varibles problem

All, Any chance someone could help me with this.... The script is reading from a file and for every line of input to the loop I am trying to assign a new varible. When i run the script I get the below errors. I have come to a bit of a dead end so any pointers/help would be very much... (1 Reply)
Discussion started by: oconnon2
1 Replies

10. Programming

how to auto load a dynamic library

hi, every body. i have in trouble that how to load a dynamic library by hand. for example, i know how to generate a dynamic library and how to link a dynamic library in makefile. generate a dynamic library: add -dy -G behind cc link a dynamic library in makefile: add -dy -Bdynamic behind cc... (0 Replies)
Discussion started by: subrain
0 Replies
Login or Register to Ask a Question