Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Steven N. Hirsch <shirsch@ibm.net>
Subject: Re: Some error msgs on Tcl library
Date: Thu, 10 Jul 1997 22:01:29 -0400 (EDT)	[thread overview]
Message-ID: <4a09b1e7dcd0222dc0bd0839f8fb39df.axp-list@archive.invalid> (raw)
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 "<symbol>" - | 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

      parent reply	other threads:[~1997-07-11  2:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-11  1:41 Some error msgs on Tcl library Fude Yao
1997-07-11  1:52 ` Vernard Martin
1997-07-11  2:01 ` Steven N. Hirsch [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox