From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4a09b1e7dcd0222dc0bd0839f8fb39df.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199707110152.VAA26566@cleon.cc.gatech.edu> Date: Thu, 10 Jul 1997 22:01:29 -0400 (EDT) From: Steven N. Hirsch Subject: Re: Some error msgs on Tcl library In-Reply-To: <199707110141.VAA19120@everest.micro.umass.edu> On Thu, 10 Jul 1997, Fude Yao wrote: > Hi, everyone, > > I am trying to compile an example C file (simple.c from John Ousterhout's > book) that use the tcl library. I got the following msg: > > /usr/lib/libtcl7.6.so: undefined reference to `dlerror' > /usr/lib/libtcl7.6.so: undefined reference to `dlopen' > /usr/lib/libtcl7.6.so: undefined reference to `dlsym' > > I use the command > > gcc simple.c -ltcl -lm > > What is wrong? You need to link against /lib/libdl.so: gcc -o simple simple.c -ltcl -lm -ldl Enjoy! Steve p.s. - A good trick to remember when you get missing symbols and are not sure where they can be satisfied: $ find / -name "lib*.so.*" -print | xargs nm | grep "" - | more Works every time (assuming you _have_ a library with the missing entry points..). -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com