Autotools: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Configure == === Add extra library on link commands == <source lang="bash"> ./configure LDFLAGS="-lintl -liconv" </source>") |
|||
Line 1: | Line 1: | ||
== Configure == |
== Configure == |
||
=== Add extra |
=== Add extra link flags or libraries === |
||
To add extra link flags (like location of libraries), use <code>LDFLAGS</code>: |
|||
<source lang="bash"> |
<source lang="bash"> |
||
./configure LDFLAGS="- |
./configure LDFLAGS="-L/path/to/libs" |
||
</source> |
</source> |
||
To add extra libraries, use <code>LDLIBS</code>: |
|||
<source lang="bash"> |
|||
./configure LDLIBS="-lintl -liconv" |
|||
</source> |
|||
* '''Note''': Don't use <code>LDFLAGS</code> to add extra libraries, because it appears before list of source objects, and hence will be ignored by gcc. |
|||
* '''Note''': If <code>LDLIBS</code> does not work, try <code>LIBS</code> instead. |
Revision as of 09:56, 3 July 2017
Configure
Add extra link flags or libraries
To add extra link flags (like location of libraries), use LDFLAGS
:
./configure LDFLAGS="-L/path/to/libs"
To add extra libraries, use LDLIBS
:
./configure LDLIBS="-lintl -liconv"
- Note: Don't use
LDFLAGS
to add extra libraries, because it appears before list of source objects, and hence will be ignored by gcc. - Note: If
LDLIBS
does not work, tryLIBS
instead.