Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-01 01:52:14


Hi Malcolm,

> thanks for your response, I have attached an example of the failure.
> cd linkproblem/link_category
> execute bjam, should do it.

Thanks. I've renamed "Jamfile" to "Jamroot" to make this standalone project,
and the problem reproduces. It's pretty obvious: you run "bjam" in
"link_category". Boost.Build loads Jamfile there and parent Jamroot.
Nothing is those files asks Boost.Build to load category/ttt/Jamfile,
so project id /core/category/ttt is not known.

In fact, you never define such project id!

When I modify link_category/Jamfile to be:

exe test_main : test_main.cpp ../category/ttt//ttt
;

things work for me.

> >> My main exe(link_category/Jamfile) target is declared like:
> >> exe test_main : test_main.cpp /core/category//ttt ;
> >>
> >> upon executing bjam I receive this error message:
> >> error: Unable to find file or target named
> >> error: '/core/category//ttt'
> >> error: referred from project at
> >> error: '.'
> >>
> >> I get a similar error message if I use ../category//ttt also.

Agh!!! The "//" part should separate directory name from target name.
The directory "../category" has no Jamfile to beging with, and so has no
target "ttt". Try using ../category/ttt

> >>
> >> The ttt lib(category/ttt/Jamfile) target is declared like:
> >> lib TTT : ttt.cpp ttt.h : <link>static ;
> >
> > So, the target name is "TTT" and you're referrting to it as "ttt".
> > Those are different names!
>
> well interestingly enough in the above I am refering to the category
> name and not the library name. I accidentally started using this syntax
> one day and didn't realise until this post what i was doing. In my
> experience either /core/category/ttt//TTT or /core/category//ttt are
> equivalent (of course normally I expect it to link:).

For simplicity, let's use paths.

../category/ttt

referts to project in that directory. Project is considered a kind of target,
and so can be built. Building it will build all non-explicit targets in that
project.

../category/ttt//ttt

refers to target 'ttt' in project in directory ../category/ttt

Does this clarify things?

> begin 644 linkproblem.zip
> M4$L#!`H``````(IC&S,````````````````5````;&EN:W!R;V)L96TO8V%T

BTW, if possible please use ordinary attachments, not uuencoded in
message body.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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