Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-13 14:49:40


"jornj2001" <jornj_at_[hidden]> writes:

> 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.

Which documentation tells you to do that?

> 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 ;

Should be:

exe jjtest
: # sources
jjtest.cpp
: # requirements
<find-library>shouldfail
<find-library>morenonsense
;

You might also want to add some <library-path> properties to the
requirements.

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk