[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: |
Bob Proulx |
Subject: |
Re: Why configure script says to link this library with LIBADD instead of LDADD? |
Date: |
Mon, 28 Apr 2003 21:55:05 -0600 |
User-agent: |
Mutt/1.3.28i |
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