Re: [ILUG] Linker problems

From: kevin lyda (kevin+dated+1032787013.e471f8 at domain ie.suberic.net)
Date: Wed 18 Sep 2002 - 14:17:03 IST


On Wed, Sep 18, 2002 at 02:11:19PM +0100, Carlos Luna wrote:
> In /usr/lib are located:
> - libjpeg.a

static library.

> - libjpeg.la

weird libtool thing.

> - libjpeg.so (link to libjpeg.so.62.0.0)
> - libjpeg.so.62.0.0

shared object.

> Of course, I'm using the -ljpeg flag for the linker but to no avail.
> I've also read that /usr/lib is a 'trusted' directory, so there
> shouldn't be any need to add this path to ld.so.conf. It doesn't work
> anyway. I've already tried. :)

you don't use ld.so.conf when compiling. the runtime linker uses that
to find the shared object. that said, /usr/lib should be checked.

> What could be going wrong? Is it a path problem?
> Should there be a special linker flag?
> Is there a tool I could use to check out the contents of a library file?

nm

check it's man page to understand it's output. and run it against the
.a file. quite simply, try:

    nm /usr/lib/libjpeg.a | grep symbol-your-linker-claims-it-cannot-find

also, i never saw your first message, if you still have problems include
the error.

kevin

-- 
kevin at domain suberic.net     that a believer is happier than a skeptic is no more to
fork()'ed on 37058400    the point than the fact that a drunken man is happier
meatspace place: home       than a sober one. the happiness of credulity is a
http://ie.suberic.net/~kevin   cheap & dangerous quality -- g.b. shaw


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:56 GMT