Hi Martin, this only works by linking against a static ROOT library. A static ROOT library can be obtained when you build ROOT yourself. Do: ./configure linux make make static this will create a libRoot.a against which you can link statically. Cheers, Fons. On Wed, 2002-04-17 at 18:18, Martin Aleksa wrote: > Dear ROOT team > > I would like to compile a ROOT source file and then link it with the > option -static in order to include all the libraries needed! > > I get the following error (I just added to the LDFLAGS -static): > > g++ -O -Wall -fPIC -D_REENTRANT -I/afs/cern.ch/na49/library.4/ROOT/pro/i386_redhat60/root/include -c fitfun.C -o fitfun.o > g++ -O -static fitfun.o -L/afs/cern.ch/na49/library.4/ROOT/pro/i386_redhat60/root/lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lm -ldl -lpthread -rdynamic -o fitfun > /usr/bin/ld: cannot open -lCore: No such file or directory > collect2: ld returned 1 exit status > gmake: *** [fitfun] Error 1 > > without -static option it compiles! > What is wrong? How can this be done? > > Thank's in advance, > Martin > > -------------------------------------------------------------- > Martin Aleksa: > CERN: private: > EP-Division, 653, Les Pommeraies, > CH-1211 Geneva 23 F-74160 Archamps > phone: 0041 +22 76 78982 0033 +4 50 43 79 93 > fax: 0041 +22 76 79070 > e-mail: martin.aleksa@cern.ch > -------------------------------------------------------------- > > > -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET