From: John P. Looney (john at domain antefacto.com)
Date: Mon 18 Jun 2001 - 13:08:27 IST
On Mon, Jun 18, 2001 at 12:00:16PM +0000, Conor Daly mentioned:
> Trying to compile a program with some proprietry libs and having a bit of
> I was told I needed to use a "-ldl" switch to use "libdl.a" which fixed
> the errors below. My problem now is, how do I divine from the output below
> that I was supposed to use such a switch? Or, how will I divine from some
> other arcane output to something else which lib I'm supposed to use *this
> [cdaly at domain bofh src]$ gcc readboys.dup.c -L /usr/local/ingres/ingres/lib -lingres
> /usr/local/ingres/ingres/lib/libingres.a(louniq.o): In function `LOuniq':
> louniq.o(.text+0x144): the use of `mktemp' is dangerous, better use
> /usr/local/ingres/ingres/lib/libingres.a(ci.o): In function `CIcapability':
> ci.o(.text+0x1b5): undefined reference to `dlopen'
> ci.o(.text+0x1d0): undefined reference to `dlopen'
> ci.o(.text+0x1f4): undefined reference to `dlsym'
> ci.o(.text+0x20c): undefined reference to `dlsym'
I'd go looking for what library had "dlopen" in it. First thing would be
to RTFM, which down the bottom has;
If this program were in a file named "foo.c", you would build the
program with the following command:
gcc -rdynamic -o foo foo.c -ldl
Other things would be "use 'nm' on all the files in /lib and look for
something that exported dlopen()."
-- When I say 'free', I mean 'free': free from bond, of chain or command: to go where you will, even to Mordor, Saruman, if you desire. " -- Gandalf, paraphrasing the choice between Free and Non-free software
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:42 GMT