libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlopening installable ltdl modules failing (OS X problem only)


From: Ralf Wildenhues
Subject: Re: dlopening installable ltdl modules failing (OS X problem only)
Date: Sat, 18 Aug 2007 10:41:08 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello David,

* David Fang wrote on Sat, Aug 18, 2007 at 05:05:13AM CEST:
> 
> The executable takes command-line arguments that call lt_dladdsearchpath
> (option -L) and lt_dlopenext (option -l).  The file, ../../lib/mymodule.la
> has already been built at the time of testing.  The executable is invoked
> with "-L../../lib -lmymodule" to reference ../../lib/mymodule.la.

At link time, use in LDADD/LIBADD
  ../../lib/mymodule.la

instead of
  -L../../lib -lmymodule

for deplibs (as a rule of thumb you should never use -l for in-tree
libs).  For modules that you don't actually link against, but only
lt_dlopen, use
  -dlopen ../../lib/mymodule.la

(typically this causes no changes in the link, unless you also support
dlpreopening), and at execution time of uninstalled programs, use
  ./libtool --mode=execute -dlopen ../../lib/mymodule.la $program

which should help to find the needed libs.

But maybe I've not yet understood the root cause of the problem, and
it's Darwin specific, in which case Peter will find out.  ;-)

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]