Boost logo

Boost-Build :

From: jornj2001 (jornj_at_[hidden])
Date: 2002-11-13 14:06:52

My apologies if this is obvious, but I suspect there is a bug in the
current jamboost, boost_1_29_0, on linux with gcc. Or with the
documentation that specifies that I should use LINKLIBS.

I have tried to figure out how to link with external libraries. If I
am to entrenched in make and you spot me thinking the wrong way,
please let me know.

I have encountered three problems:
1. gcc-Link-action uses LINKFLAGS, but does not use LINKLIBS that
seems to be the one used for specifying thirdparty libraries.
2. I have not been able to make "LINKLIBS on mybinary = xx" work.
3. When I specify LINKLIBS += value 'globally' in Jamfile, it is
evaluated twice.

For the problem with LINKFLAGS in gcc-Link-action: I made this work
by adding "$(LINKLIBS)" after "-l$(FINDLIBS)" in the link line for
the gcc-Link-action in gcc-tools.jam.

For setting the LINKLIBS value, I added an echo of $(LINKLIBS) to my
gcc-Link-action to see what it was really set to. Here is my example
Jamfile and the output from bjam:

--- My Jamfile ---
LINKLIBS on jjtest = -lshouldfail ;
LINKLIBS += -lmorenonsense ;
exe jjtest : jjtest.cpp ;

--- The relevant output from bjam, notice the LINKLIBS value ---
gcc-C++-action bin/jjtest/gcc/debug/runtime-link-dynamic/jjtest.o
gcc-Link-action bin/jjtest/gcc/debug/runtime-link-dynamic/jjtest
LINKLIBS is set to -lmorenonsense -lmorenonsense
/usr/bin/ld: cannot find -lmorenonsense
collect2: ld returned 1 exit status

echo LINKLIBS is set to -lmorenonsense -lmorenonsense
g++ -g -o "bin/jjtest/gcc/debug/runtime-link-dynamic/jjtest"
-lmorenonsense -lmorenonsense

--- cut ---

Any pointers as to what I did wrong?



Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at