* Some error msgs on Tcl library
@ 1997-07-11 1:41 Fude Yao
1997-07-11 1:52 ` Vernard Martin
1997-07-11 2:01 ` Steven N. Hirsch
0 siblings, 2 replies; 3+ messages in thread
From: Fude Yao @ 1997-07-11 1:41 UTC (permalink / raw)
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?
Fude Yao
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Some error msgs on Tcl library
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
1 sibling, 0 replies; 3+ messages in thread
From: Vernard Martin @ 1997-07-11 1:52 UTC (permalink / raw)
> /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
You need to add "-dl" to your link line so that you can link in the dynamic
linking library.
hope this helps
V
--
Vernard Martin, High Performance Parallel Computation and Experimentation Lab
(vernard@cc.gatech.edu) http://www.cc.gatech.edu/~vernard/
College of Computing, Georgia Institute of Technology, Atlanta, GA 30332
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Some error msgs on Tcl library
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
1 sibling, 0 replies; 3+ messages in thread
From: Steven N. Hirsch @ 1997-07-11 2:01 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-07-11 2:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox