Hi Matt, Add option "-ldl" in your link sequence. See with root-config --libs the list of options for linking Rene Brun On Tue, 18 Mar 2003, Matthew Bellis wrote: > Hi all, > > I'm running root 3.04.02 on a debian machine. To compile I did a > > make deb > > but I needed to comment out lines in rootd/src/rootd.cxx as per > previous discussions in roottalk. > http://root.cern.ch/root/roottalk/roottalk03/0045.html > > Everything built fine. > > Now I want to compile some of my executables statically. They > use TMinuit stuff. So I did a > > make static > > and moved lib/libRoot.a to where my root libraries are. But > when I compile I get the following errors. > > > g++ -O -Wall -fPIC -D_REENTRANT -I/usr/local/include/root > -I/rest/clas/builds/LATEST/packages/include -static GENERALfastfit.cc > -L/usr/local/lib/root -lRoot -o GENERALfastfit > /usr/local/lib/root/libRoot.a(TSystem.o)(.text+0x5295): In function > `TSystem::CompileMacro(char const*, char const*, char const*, char > const*)': > : the use of `tmpnam' is dangerous, better use `mkstemp' > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x200): In function > `G__dlopen': > : undefined reference to `dlopen' > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x217): In function > `G__dlopen': > : undefined reference to `dlerror' > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x2c2): In function > `G__shl_findsym': > : undefined reference to `dlsym' > /usr/local/lib/root/libRoot.a(shl.o)(.text+0x309): In function > `G__dlclose': > : undefined reference to `dlclose' > /usr/local/lib/root/libRoot.a(TUnixSystem.o)(.text+0x244c): In function > `TUnixSystem::StackTrace()': > : undefined reference to `dladdr' > collect2: ld returned 1 exit status > make: *** [GENERALfastfit] Error 1 > > > > Any ideas? > > Matt Bellis > RPI >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET