Boost logo

Boost-Build :

Subject: Re: [Boost-build] linking against external librarys
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-12-08 12:13:55


AMDG

On 12/8/2010 8:41 AM, HarrievA_at_[hidden] wrote:
> Hey Guys,
>
> I want to link all my programs against one library. When i'm in a subdirectory i
> get the error: "Unable to find file or target named"...
>
> This is what my Jamroot looks like:
> lib boostsystem : :<name>boost_system ;
> explicit boostsystem ;
> project : default-build release
> : requirements<cxxflags>"-std=gnu++0x"
> : requirements<include>.
> : requirements<library>boostsystem
> : build-dir ./bin
> ;
> #exe sertest : samples/sertest.cpp ;
> build-project samples ;
>
> The samples/Jamfile contains only the line:
> exe sertest : sertest.cpp ;
>
> By typing bjam I get the errormessage:
> error: Unable to find file or target named
> error: 'boostsystem'
> error: referred from project at
> error: 'samples'

You need to have a target for the library that you
want to link to. For example:

searched-lib boostsystem ;

(This will add -lboostsystem to the linker command line)

In Christ,
Steven Watanabe


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