libtool
[Top][All Lists]
Advanced

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

Re: Any way to specify path for *.la files?


From: J.T. Conklin
Subject: Re: Any way to specify path for *.la files?
Date: Mon, 18 Oct 2004 16:45:54 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, berkeley-unix)

Bob Friesenhahn <address@hidden> writes:
> Libtool will use -L arguments (similar to a linker) when it searches
> for .la files.
>
> Since you using Automake, it is best to add library dependencies
> directly using LDADD since this ensures that the correct library is
> used, even for static linkage.  Static libraries can be a problem if
> there is an existing installed shared library with the same name since
> system linkers normally choose the shared version.

Before I sent my message, I tried adding -L's to *_LDFLAGS and
dependent *.la's to LIBADD like this:

    libTAO_CosNaming_la_LDFLAGS = \
      -version-number @TAO_MAJOR@:@TAO_MINOR@:@TAO_BETA@ \
      -L$(TAO_BUILDDIR)/tao \
      -L$(ACE_BUILDDIR)/ace

    libTAO_CosNaming_la_LIBADD = \
      libTAO.la \
      libACE.la

This resulted in:
     gmake[1]: *** No rule to make target `libTAO.la', needed by 
`libTAO_CosNaming.la'.  Stop.

I tried it with the suggested *_LDADD (as above, with LIBADD changed
to LDADD), it fails regenerating the Makefile from Makefile.am like
this:

    $ gmake
    cd ../../../../TAO && /bin/bash 
/home/jtc/ACE/ACE-current/ACE_wrappers/aux_config/missing --run automake-1.9 
--gnu  orbsvcs/orbsvcs/Makefile
    orbsvcs/orbsvcs/Makefile.am:63: use `libTAO_CosNaming_la_LIBADD', not 
`libTAO_CosNaming_la_LDADD'
    orbsvcs/orbsvcs/Makefile.am:63: variable `libTAO_CosNaming_la_LDADD' is 
defined but no program or
f    orbsvcs/orbsvcs/Makefile.am:63: library has `libTAO_CosNaming_la' as 
canonic name (possible typo)


Can you see what I'm doing wrong from the above Makefile.am snippet?

This is with:
     libtool 1.5.6
     automake 1.9
     autoconf 2.59

Many thanks,

    --jtc

-- 
J.T. Conklin




reply via email to

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