[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why configure script says to link this library with LIBADD instead o
From: |
cs |
Subject: |
Re: Why configure script says to link this library with LIBADD instead of LDADD? |
Date: |
Tue, 29 Apr 2003 09:36:30 -0700 (MST) |
Bob
Thanks! It is *so* great to get help when a bug
like this is really stressing you out!!
Chris
-------- Original Message --------
Subject: Re: Why configure script says to link this library with LIBADD
instead of LDADD?
From: address@hidden (Bob Proulx)
Date: Mon, April 28, 2003 8:55 pm
To: address@hidden
address@hidden wrote:
> I learned that subsubdirectories require making
> a noinst_LIBRARY object to link with executables like so:
>
> myprogram_LDADD = /path/libmynoinstlib.a
Why do you believe subdirectories require this? (And there is a bug
here too. Don't do this.)
> For current project, configure script says I should
> use LIBADD rather than LDADD?
>
> Why would it say that for this project??
I have enough knowledge of the autotools to be dangerous and am often
corrected. Take this advice accordingly. You used a full path to
that library. This would lead a program to believe that you are
referring to a system library which is not built by your project but
is expected to be part of the build environment. A "Build-Depends"
type of relationship.
If you build it in your project then all references to built objects
should be either relative or based upon one of the $(top_builddir),
$(builddir) macros. By using a hard coded full path you prevent the
project from being built in a directory other than your original
directory. This type of error will be flagged during a 'distcheck'.
Try either of these instead:
myprogram_LDADD = ../lib/libmynoinstlib.a
Or:
myprogram_LDADD = $(top_builddir)/lib/libmynoinstlib.a
Bob