On Sat, Oct 07, 2006 at 12:38:15AM +0200, Carlo Wood wrote:
> > Does it reach your dlsym() call at all, or it's just using the
> > one from libdl?  I guess I got a little confused about your mail.
> 
> I think you didn't read it very well :p
> 
> > If -ldl is first in the list, it should never reach your library
> > in the first place.
> 
> I believe I said that in my first post, possible not too clear
> though: libcwd does not define dlsym.

So, only dlopen() and dlclose().

> I don't understand why you think that no function of libcwd
> would ever be reached when there is a library before it in
> the list... What about it's _init function, to name one?

What I was trying to say there is that if you have a dlsym() (which you
don't) it would never call your dlsym() since it already found the other
first.

Anyway, after reading your mails again, I see where the -ldl comes from
now.

You have ../libltdl/libltdlc.la before -lcwd in your call to libtool,
and I think that is part of the problem.  It expands libltdlc.la to
libltdlc.a and -ldl, and there isn't any "reorder" there.  At a later
time you also say it to link to -ldl, which is a duplicate, and libtool
removes it from the command line.

For libcwd to work, you really want it to be the first library in the
list, before any other, so even before libltdlc.la.  This should make
sure that the dynamic linker will use your functions.


Kurt



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to