|
Boost-Build : |
Subject: Re: [Boost-build] Errors when using target references to boostlibraries
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-09-07 03:14:01
Bob Walters wrote:
> Johan Nilsson wrote:
>>> My goal is that using those targets avoids any
>>> need to try to
>>
>> Try to ... what?
>
> Sorry: Another victim of loss-of-focus. I'm trying to avoid putting
> any specific library
> names in the Jamfile in order to keep it OS/variant/architecture
> neutral.
>
> I've tried the approach you suggested, on windows. I'm still getting
> an odd problem - apparently
> with finding the aliases. (filesystem was the first alias in the
> library list when I ran this bjam):
>
[snip]
Strange. The following "nonsense project" works for me verbatim using
msvc-8.0 with Boost/Boost.Build/Boost.Jam combo from both 1.34.1 and current
trunk:
-- Jamroot --
import os ;
path-constant BOOST_ROOT : [ os.environ BOOST_ROOT ] ;
use-project /boost : $(BOOST_ROOT) ;
alias boost_thread : /boost//thread ;
alias boost_date_time : /boost//date_time ;
project bar
:
requirements
<include>$(BOOST_ROOT)
<link>static
;
lib foo
:
foo.cpp
boost_thread
boost_date_time
;
exe bar
:
main.cpp
foo
;
-- foo.cpp --
#include <boost/thread/thread.hpp>
#include <boost/lambda/lambda.hpp>
extern int foo()
{
int result = 0;
boost::thread t(boost::lambda::var(result) = 1);
t.join();
return result;
}
-- main.cpp --
int foo();
int main(int, char*[])
{
return foo();
}
--------------------
What is the actual value of BOOST_ROOT in environment?
/ Johan
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