Boost logo

Boost :

Subject: Re: [boost] [type_traits] extension has_operator_xxx - cv qualifiers and references
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-02-09 15:28:49


On 2/9/2011 12:04 PM, Frédéric Bron wrote:
>> bjam --boost=C:/Programming/VersionControl/boost toolset=msvc-10.0 operators
>>
>> from the test directory I get many lines like:
>>
>> compile-c-c++
>> ..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj
>> has_operator_multiplies_test.cpp
>> C:\Programming\VersionControl\sandbox\type_traits\boost/type_traits/detail/has_binary_operator.hpp(147)
>> : error C2065: 'has_operator_multiplies' : undeclared identifier
>> C:\Programming\VersionControl\sandbox\type_traits\boost/type_traits/detail/has_binary_operator.hpp(147)
>> : error C2065: 'LHS' : undeclared identifier
>>
>> etc. etc.
>>
>> Obviously something in the jamfile is not correct. I am pointing in my
>> --boost parameter to bjam to my Boost tree of the trunk in SVN. Should I run
>> against Boost 1.4.5 instead ?
>
> I am compiliing againt 1.44. Can you try to bjam -d 2 so that we have
> more information about the commands that are executed.

Here is some of the information when running bjam with -d 2:

"file
..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj.rsp
"has_operator_multiplies_test.cpp"
 
-Fo"..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj"
     -TP
  /Z7
  /Od
  /Ob0
  /W3
  /GR
  /MDd
  /Zc:forScope
  /Zc:wchar_t
  /wd4675
  /EHs
  -c

"-IC:\Programming\VersionControl\boost"

"-IC:\Programming\VersionControl\sandbox\type_traits"

compile-c-c++
..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj

     call "C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo
@"..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj.rsp"
"

and in the rsp file:

"has_operator_multiplies_test.cpp"
-Fo"..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.obj"
    -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /wd4675 /EHs -c
"-IC:\Programming\VersionControl\boost"
"-IC:\Programming\VersionControl\sandbox\type_traits"

What appears to be happening is that the include path for the entire
Boost tree installation, which in my case I am pointing to the latest
SVN trunk, takes precedence to the include path in the sandbox
type_traits directory. This may be the reason why the errors are being
seen since if it picks up the appropriate include files from the SVN
Boost trunk it will not find your changes.

I am not sure how I can change this to make it work properly, even if I
pointed to another Boost tree, such as 1.4.5 or 1.4.4 which I have on my
machine. It would still be picking up from that tree first. Nor do i
know how to tell bjam how to use your snadbox include files first. And
naturally I need to point to some Boost tree distribution, else none of
the libraries Type Traits depend on, such as Boost MPL, will be found if
I do not.

It seems the only solution is that I must put the sandbox type_traits on
top of the type_traits in the SVN trunk and then test from within the
trunk. But that is a real PITA. I wish I knew if there was a way to get
the Boost Build system to pick up the sandbox include path before it
does the Boost tree inslude path.

> I have just tried a small example in VC++2010 and it works fine,
> although there are plenty of warnings.
> in linux, I have BOOST_BUILD_PATH pointing to
> path_to_boost_1_44_0/tools/build/v2
> I do not use the command line option --boost but it is probably the same?
> maybe if I get a windows binary of bjam for windows, I can try the same as you.
>
> Frédéric
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk