Boost v1.34.1 mit Visual C++ 9.0 (Solution)



  • Hi!

    Nachdem ich Visual Studio geupdated habe wollte ich Boost neu compilieren und hab' mich grün und blau geärgert. Hier die Lösung des Rätsels:

    boost_1_34_1\tools\build\v2\boost-build.jam

    #  MSVC configuration # ++ #
    using msvc : 9.0 : "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\\cl.exe" ; # ++ #
    

    boost_1_34_1\tools\build\v2\msvc.jam

    if [ MATCH "(Microsoft Visual Studio 9.0)" : $(command) ] # ++ #
    { # ++ #
    version = 9.0 ; # ++ #
    } # ++ #
    else if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ] # ++ #
    if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ] # -- #
    {
    version = 8.0 ;
    .ProgramFiles = [ path.make [ common.get-program-files-dir ] ] ;
    .known-versions = 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ; # -- #
    .known-versions = 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ; # ++ #
    
    # ... #
    
    .version-alias-8 = 8.0 ;
    .version-alias-9 = 9.0 ; # ++ #
    
    # ... #
    
    .version-8.0-reg = "VisualStudio\\8.0\\Setup\\VC" ;
    .version-8.0express-reg = "VCExpress\\8.0\\Setup\\VC" ;
    .version-9.0-reg = "VisualStudio\\9.0\\Setup\\VC" ;  # ++ #
    .version-9.0express-reg = "VCExpress\\9.0\\Setup\\VC" ; # ++ #
    

    boost_1_34_1\boost\auto_link.hpp

    # define BOOST_LIB_TOOLSET "vc71"
    #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) /* -- */
    #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400) /* ++ */
    // vc80:
    # define BOOST_LIB_TOOLSET "vc80"
    #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1500) /* ++ */
    # define BOOST_LIB_TOOLSET "vc90" /* ++ */
    

    boost_1_34_1\boost\config\visualc.hpp

    // last known and checked version is 1400 (VC8): /* -- */
    #if (_MSC_VER > 1400) /* -- */
    // last known and checked version is 1500 (VC9): /* ++ */
    #if (_MSC_VER > 1500) /* ++ */
    # if defined(BOOST_ASSERT_CONFIG)
    # error "Unknown compiler version - please run the configure tests and report the results"
    # else
    

    boost_1_34_1\boost\signals\named_slot_map.hpp

    #if BOOST_WORKAROUND(_MSC_VER, <= 1400) /* -- */
    #if BOOST_WORKAROUND(_MSC_VER, <= 1500) /* ++ */
    void decrement();
    void advance(difference_type);
    #endif
    

    boost_1_34_1\boost\signals\named_slot_map.cpp

    #if BOOST_WORKAROUND(_MSC_VER, <= 1400) /* -- */
    #if BOOST_WORKAROUND(_MSC_VER, <= 1500) /* ++ */
    void named_slot_map_iterator::decrement() { assert(false); }
    void named_slot_map_iterator::advance(difference_type) { assert(false); }
    #endif
    

    greetz, Swordfish



  • Hallo!

    Ich habe mir gerade boost v1.34.1 heruntergeladen und entpackt.
    boost_1_34_1\tools\build\v2\boost-build.jam habe ich wie angegeben modifiziert.
    Allerdings existieren bei mir die Dateien
    - boost_1_34_1\tools\build\v2\msvc.jam
    - boost_1_34_1\boost\auto_link.hpp
    - boost_1_34_1\boost\config\visualc.hpp
    - boost_1_34_1\boost\signals\named_slot_map.hpp
    - boost_1_34_1\boost\signals\named_slot_map.cpp
    nicht.

    MfG



  • Hast Du eine URL zu dem Download in dem die besagten Dateien fehlen sollen?

    greetz, Swordfish



  • Ich habe boost als Zip Datei bei sourceforge runtergeladen:
    http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=527428



  • @swordfish. kannst du mir evtl die modifizierten dateien zusenden?
    muffmolch at gmx de



  • Ich habe die Dateien jetzt gefunden:
    - Die Datei boost_1_34_1\tools\build\v2\msvc.jam ist in dem Ordner boost_1_34_1\tools\build\v2\tools.
    - Die Datei boost_1_34_1\boost\auto_link.hpp ist in dem Ordner boost_1_34_1\boost\config.
    - Die Datei boost_1_34_1\boost\config\visualc.hpp ist in dem Ordner boost_1_34_1\boost\config\compiler.
    - Die Datei boost_1_34_1\boost\signals\named_slot_map.hpp ist in dem Ordner boost_1_34_1\boost\signals\detail.
    - Die Datei boost_1_34_1\boost\signals\named_slot_map.cpp ist in dem Ordner boost_1_34_1\libs\signals\src.
    Bitte korrigiere deine "Solution".



  • Ich habe mal ein unified diff erstellt. Damit sollte es einfacher gehen:

    `

    diff -u -r boost_1_34_1/boost/config/auto_link.hpp boost_1_34_1.vc9/boost/config/auto_link.hpp

    --- boost_1_34_1/boost/config/auto_link.hpp 2005-12-07 20:11:42.000000000 +0100

    +++ boost_1_34_1.vc9/boost/config/auto_link.hpp 2008-02-29 16:01:00.000000000 +0100

    @@ -130,11 +130,16 @@

    // vc71:
    

    define BOOST_LIB_TOOLSET "vc71"

    -#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)

    +#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)

    // vc80:
    

    define BOOST_LIB_TOOLSET "vc80"

    +#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1500)

    • // vc90:

    +# define BOOST_LIB_TOOLSET "vc90"

    #elif defined(BORLANDC)

    // CBuilder 6:
    

    diff -u -r boost_1_34_1/boost/config/compiler/visualc.hpp boost_1_34_1.vc9/boost/config/compiler/visualc.hpp

    --- boost_1_34_1/boost/config/compiler/visualc.hpp 2006-01-13 03:48:08.000000000 +0100

    +++ boost_1_34_1.vc9/boost/config/compiler/visualc.hpp 2008-02-29 16:03:40.000000000 +0100

    @@ -154,6 +154,8 @@

    define BOOST_COMPILER_VERSION 7.1

    elif _MSC_VER == 1400

    define BOOST_COMPILER_VERSION 8.0

    +# elif _MSC_VER == 1500

    +# define BOOST_COMPILER_VERSION 9.0

    else

    define BOOST_COMPILER_VERSION _MSC_VER

    endif

    @@ -168,8 +170,8 @@

    #error "Compiler not supported or configured - please reconfigure"

    #endif

    //

    -// last known and checked version is 1400 (VC8):

    -#if (_MSC_VER > 1400)

    +// last known and checked version is 1500 (VC9):

    +#if (_MSC_VER > 1500)

    if defined(BOOST_ASSERT_CONFIG)

    error "Unknown compiler version - please run the configure tests and report the results"

    else

    diff -u -r boost_1_34_1/boost/signals/detail/named_slot_map.hpp boost_1_34_1.vc9/boost/signals/detail/named_slot_map.hpp

    --- boost_1_34_1/boost/signals/detail/named_slot_map.hpp 2007-01-07 15:23:24.000000000 +0100

    +++ boost_1_34_1.vc9/boost/signals/detail/named_slot_map.hpp 2008-02-29 16:04:28.000000000 +0100

    @@ -127,7 +127,7 @@

         || slot_ == other.slot_));
    

    }

    -#if BOOST_WORKAROUND(_MSC_VER, <= 1400)

    +#if BOOST_WORKAROUND(_MSC_VER, <= 1500)

    void decrement();

    void advance(difference_type);

    #endif

    diff -u -r boost_1_34_1/libs/signals/src/named_slot_map.cpp boost_1_34_1.vc9/libs/signals/src/named_slot_map.cpp

    --- boost_1_34_1/libs/signals/src/named_slot_map.cpp 2006-09-30 07:45:56.000000000 +0200

    +++ boost_1_34_1.vc9/libs/signals/src/named_slot_map.cpp 2008-02-29 16:05:04.000000000 +0100

    @@ -24,7 +24,7 @@

    typedef slot_container_type::const_iterator const_group_iterator;

    -#if BOOST_WORKAROUND(_MSC_VER, <= 1400)

    +#if BOOST_WORKAROUND(_MSC_VER, <= 1500)

    void named_slot_map_iterator::decrement() { assert(false); }

    void named_slot_map_iterator::advance(difference_type) { assert(false); }

    #endif

    diff -u -r boost_1_34_1/tools/build/v2/boost-build.jam boost_1_34_1.vc9/tools/build/v2/boost-build.jam

    --- boost_1_34_1/tools/build/v2/boost-build.jam 2006-11-05 00:24:36.000000000 +0100

    +++ boost_1_34_1.vc9/tools/build/v2/boost-build.jam 2008-02-29 15:54:12.000000000 +0100

    @@ -3,6 +3,6 @@

    Copyright 2003 Vladimir Prus

    Distributed under the Boost Software License, Version 1.0.

    (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

    +# MSVC configuration # ++ #

    +using msvc : 9.0 : "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\cl.exe" ; # ++ #

    boost-build kernel ;

    diff -u -r boost_1_34_1/tools/build/v2/tools/msvc.jam boost_1_34_1.vc9/tools/build/v2/tools/msvc.jam

    --- boost_1_34_1/tools/build/v2/tools/msvc.jam 2007-05-10 11:05:12.000000000 +0200

    +++ boost_1_34_1.vc9/tools/build/v2/tools/msvc.jam 2008-02-29 15:58:20.000000000 +0100

    @@ -231,7 +231,11 @@

         {
    
             # Even if version is not explicitly specified, try to detect the version
    
             # from the path.
    
    •        if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]
      
    •        if [ MATCH "(Microsoft Visual Studio 9.0)" : $(command) ]
      
    •        {
      
    •            version = 9.0 ;
      
    •        }
      
    •        else if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]
      
             {
      
                 version = 8.0 ;
      
             }                 
      

    @@ -913,13 +917,14 @@

    .ProgramFiles = [ path.make [ common.get-program-files-dir ] ] ;

    -.known-versions = 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;

    +.known-versions = 9.0 9.0express 8.0 8.0express 7.1 7.1toolkit 7.0 6.0 ;

    Version aliases

    .version-alias-6 = 6.0 ;

    .version-alias-6.5 = 6.0 ;

    .version-alias-7 = 7.0 ;

    .version-alias-8 = 8.0 ;

    +.version-alias-9 = 9.0 ;

    Name of the registry key that contains Visual C++ installation path

    (relative to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft"

    @@ -928,6 +933,8 @@

    .version-7.1-reg = "VisualStudio\7.1\Setup\VC" ;

    .version-8.0-reg = "VisualStudio\8.0\Setup\VC" ;

    .version-8.0express-reg = "VCExpress\8.0\Setup\VC" ;

    +.version-9.0-reg = "VisualStudio\9.0\Setup\VC" ;

    +.version-9.0express-reg = "VCExpress\9.0\Setup\VC" ;

    Visual C++ Toolkit 2003 do not store its installation path in the registry.

    The environment variable 'VCToolkitInstallDir' and the default installation

    `



  • habe es nun auch hinbekommen und die lib wird scheinbar brav kompiliert.

    was mich noch interessieren würde:
    wird automatisch x64 kompilert oder muss man da noch ein flag setzen?
    ich hab den build vorgang mit

    bjam --buil-dir=c:\boost --toolset=msvc

    gestartet



  • Kitty schrieb:

    Bitte korrigiere deine "Solution".

    bump



  • Hallo,
    in solchen Fällen macht es erstmal Sinn, sich boost vom SVN server zu laden.
    Dort ist dieses Problem nämlich schon seit Monaten gefixt.


Anmelden zum Antworten