[Boost-users] Building FileSystem Version 3 static libraries

206 views
Skip to first unread message

Bibbo, Joe

unread,
Sep 13, 2010, 4:54:43 PM9/13/10
to boost...@lists.boost.org
I have downloaded the boost v1.44 and would like to see if our usage of the FileSystem library is
compatible with Version 3 of library. I am having trouble building the library.
 
 Using the command
 
bjam toolset=msvc-9.0 variant=debug threading=multi link=static define=_BIND_TO_CURRENT_VCLIBS_VERSION define=BOOST_FILESYSTEM_VERSION=3 --with-filesystem
 
I am seeing following error message
 
"
..
compile-c-c++ bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\error_code.obj
error_code.cpp
msvc.archive bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\libboost_system-vc90-mt-gd-1_44.lib
common.copy stage\lib\libboost_system-vc90-mt-gd-1_44.lib
bin.v2\libs\system\build\msvc-9.0\debug\link-static\threading-multi\libboost_system-vc90-mt-gd-1_44.lib
        1 file(s) copied.
compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj
v2_operations.cpp
S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error :  Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2
    call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj.rsp"
...failed compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_operations.obj...
compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj
v2_path.cpp
S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error :  Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2
    call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj.rsp"
...failed compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_path.obj...
compile-c-c++ bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_portability.obj
v2_portability.cpp
S:\sony4\boost\boost_1_44_0\boost/filesystem/v2/config.hpp(16) : fatal error C1189: #error :  Compiling Filesystem version 2 file with BOOST_FILESYSTEM_VERSION defined != 2
    call "G:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin.v2\libs\filesystem\build\msvc-9.0\debug\link-static\threading-multi\v2\src\v2_portability.obj.rsp"
... "
 
Is there something else I need to configure to build this version of the library?
 
Regards,
Joe

Jürgen Hunold

unread,
Sep 14, 2010, 2:54:30 AM9/14/10
to boost...@lists.boost.org
Hi Joe,

On Monday, 13. September 2010 22:54:43 Bibbo, Joe wrote:
> have downloaded the boost v1.44 and would like to see if our usage of the
> FileSystem library is compatible with Version 3 of library. I am having
> trouble building the library.
>
> Using the command
>
> bjam toolset=msvc-9.0 variant=debug threading=multi link=static
> define=_BIND_TO_CURRENT_VCLIBS_VERSION define=BOOST_FILESYSTEM_VERSION=3
> --with-filesystem

Try quotes for 'define=BOOST_FILESYSTEM_VERSION=3'.
This should read define="BOOST_FILESYSTEM_VERSION=3" else bjam will happily
strip the second "=" from the command line.

Try to run with -n to see the actual command line or look at the .rsp files
created.

Yours,

Jürgen

--
* Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für
* voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH
* fax : ++49 511 262926 99 ! Lister Straße 15
* juergen...@ivembh.de ! www.ivembh.de
*
* Geschäftsführer: ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke !

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

PB

unread,
Sep 14, 2010, 5:49:57 AM9/14/10
to boost...@lists.boost.org

It is my understanding that you don't need to specify
BOOST_FILESYSTEM_VERSION when building Boost 1.44. This macro is to be
placed in the preprocessor settings of a program that uses Boost 1.44.

I upgraded to Boost 1.44 yesterday and was confused with this. I read
the following text from the source file
boost_1_44_0\libs\filesystem\v3\src\path.cpp which cleared up my
confusion:

// During the transition to V3, libraries are compiled with both V2
and V3 sources.
// On old compilers that don't support V3 anyhow, we just skip
everything so the compile
// will succeed and the library can be built.

Regards,

Pete

Roland Bock

unread,
Sep 14, 2010, 6:26:49 AM9/14/10
to boost...@lists.boost.org
On 09/14/2010 11:49 AM, PB wrote:
> On Mon, Sep 13, 2010 at 9:54 PM, Bibbo, Joe<Joe....@am.sony.com> wrote:
>
>> I have downloaded the boost v1.44 and would like to see if our usage of the
>> FileSystem library is
>> compatible with Version 3 of library. I am having trouble building the
>>
[...]

>> Is there something else I need to configure to build this version of the
>> library?
>>
> It is my understanding that you don't need to specify
> BOOST_FILESYSTEM_VERSION when building Boost 1.44. This macro is to be
> placed in the preprocessor settings of a program that uses Boost 1.44.
>
>
Better still, if you want to make sure not to use any deprecated stuff
(which might go away later), you do something like this

#define BOOST_FILESYSTEM_VERSION 3 // for boost 1.44, only
#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>

PB

unread,
Sep 14, 2010, 9:53:50 AM9/14/10
to boost...@lists.boost.org
On Tue, Sep 14, 2010 at 11:26 AM, Roland Bock <rb...@eudoxos.de> wrote:
> On 09/14/2010 11:49 AM, PB wrote:
>>
>> On Mon, Sep 13, 2010 at 9:54 PM, Bibbo, Joe<Joe....@am.sony.com>  wrote:
>>
>>>
>>> I have downloaded the boost v1.44 and would like to see if our usage of
>>> the
>>> FileSystem library is
>>> compatible with Version 3 of library. I am having trouble building the
>>>
>
> [...]
>>>
>>> Is there something else I need to configure to build this version of the
>>> library?
>>>
>>
>> It is my understanding that you don't need to specify
>> BOOST_FILESYSTEM_VERSION when building Boost 1.44. This macro is to be
>> placed in the preprocessor settings of a program that uses Boost 1.44.
>>
>>
>
> Better still, if you want to make sure not to use any deprecated stuff
> (which might go away later), you do something like this
>
> #define BOOST_FILESYSTEM_VERSION 3 // for boost 1.44, only
> #define BOOST_FILESYSTEM_NO_DEPRECATED
> #include <boost/filesystem.hpp>

Roland,

Just introduced BOOST_FILESYSTEM_NO_DEPRECATED and that's picked up a
few more functions I'm using that that are now deprecated.

Thanks,

Pete

Reply all
Reply to author
Forward
0 new messages