Boost logo

Boost Users :

Subject: Re: [Boost-users] Problems compiling those libraries that are not header only on 64 bit Windows 7
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2011-01-27 04:18:17


Ted Byers wrote:

> I tried asking this yesterday, but received a message saying I had to
> subscribe to this list first. I don't understand that reply as I had
> already subscribed half an hour before I asked the question, and I have been
> receiving email from the list ever since.
>
>
>
> So, I am going to try again (with the query updated to reflect my latest
> attempts).
>
> ============================================================================
> ====================
>
> I am working on Windows 7 Pro, 64 bit.
>
>
>
> I have two versions of MS VS: MS VS 2005 and MS VS 2010. I guess my first
> question is, "Will library files produced by MS VS 2005 work with MS VS
> 2010?" I know that library files compiled by compilers from different
> sources (gcc vs MSVC) won't work with each other (unless the library was
> written in C or FORTRAN), but does the same apply to different versions fo
> the same compiler? I have a long practice of passing my code through
> different compilers when part of the requirement is to produce portable
> code, since different compiler producers will have different strengths and
> weaknesses; different understandings of applicable standards. But a limited
> budget means I have to coerce them to live on the same hardware.
>
>
>
> I used a prebuilt distribution of bjam for all my attempts to build the
> boost libraries using msvc++. I did not compile it myself.

Please use the bootstrap.bat script to build bjam from the 1.45 release,
and then use it.

>
>
>
> I also have Cygwin installed.
>
>
>
>>From the C:\boost_1_45_0 directory, I tried the following to keep the builds
> for the two versions separate (planning on changing the library directories
> based on the build environment), but when both finished, both
> C:\boost_1_45_0\lib\msvc2010\x64 and bjam
> --build-dir=C:\boost_1_45_0\lib\msvc2010\x32 were empty and
> C:\boost_1_45_0\stage\lib had 606 items.
>
>
>
> bjam --build-dir=C:\boost_1_45_0\lib\msvc2010\x32 --build-type=complete
>
> bjam --build-dir=C:\boost_1_45_0\lib\msvc2010\x64 --build-type=complete

I am somewhat confused -- those two commands differ only in --build-dir option,
therefore they will build boost using the same version of the same compiler.
If you with to use different versions, specify toolset=msvc-10.0 and toolset=msvc-9.0
during those invocations. Also, use address-model=64 if you wish to build 64-bit
libraries. See:

http://www.boost.org/boost-build2/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.msvc

You should also use --stagedir=XXX to put the final build products into different directories.
--build-dir is only for specifying intermediate directory.

>
>
>
> And if I execute bjam in status, I get a result that says something like 30
> out of 30K tests failed. (Is that normal?)

I think so.

> Here are the results from my latest attempt using cygwin.
>
>
>
> $ ../boost-jam-3.1.18/bin.cygwinx86/bjam --layout=versioned
> --build-type=complete
>
> warning: No toolsets are configured.
>
> warning: Configuring default toolset "gcc".
>
> warning: If the default is wrong, your build may not work correctly.
>
> warning: Use the "toolset=xxxxx" option to override our guess.
>
> warning: For more configuration options, please consult
>
> warning:
> http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html
>
>
>
> Building the Boost C++ Libraries.
>
>
>
>
>
> /home/Ted/boost_1_45_0/tools/build/v2/build/configure.jam:145: in builds-raw
>
> *** argument error
>
> * rule UPDATE_NOW ( targets * : log ? : ignore-minus-n ? )

You need to build bundled bjam using bootstrap.sh

HTH,
Volodya

-- 
Vladimir Prus
Mentor Graphics
+7 (812) 677-68-40

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net