[Boost-bugs] [Boost C++ Libraries] #4902: strange auto_link behaviour with --layout=system & defined BOOST_AUTO_LINK_NOMANGLE under vc9.0

Subject: [Boost-bugs] [Boost C++ Libraries] #4902: strange auto_link behaviour with --layout=system & defined BOOST_AUTO_LINK_NOMANGLE under vc9.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-29 09:16:24


#4902: strange auto_link behaviour with --layout=system & defined
BOOST_AUTO_LINK_NOMANGLE under vc9.0
-------------------------------+--------------------------------------------
 Reporter: kopylov@… | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
-------------------------------+--------------------------------------------
 Env: Visual Studio 9.0.30729.1 SP
 Boost built with --layout=system

 in user code:

 {{{
 #define BOOST_AUTO_LINK_NOMANGLE 1
 #define BOOST_LIB_DIAGNOSTIC
 #include <boost/filesystem.hpp>
 }}}

 in auto_link.hpp I made a little change in pragma message to clarify what
 happens:

 {{{
 #ifdef BOOST_AUTO_LINK_TAGGED
 # pragma commentcomment(lib, BOOST_LIB_PREFIX
 BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT
 ".lib")
 # ifdef BOOST_LIB_DIAGNOSTIC
 # pragma message ("Linking to lib file(1): " BOOST_LIB_PREFIX
 BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT
 BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
 # endif
 #elif defined(BOOST_AUTO_LINK_NOMANGLE)
 # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
 # ifdef BOOST_LIB_DIAGNOSTIC
 # pragma message ("Linking to lib file(2): "
 BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
 # endif
 #else
 # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME)
 "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-"
 BOOST_LIB_VERSION ".lib")
 # ifdef BOOST_LIB_DIAGNOSTIC
 # pragma message ("Linking to lib file(3): " BOOST_LIB_PREFIX
 BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT
 BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
 # endif
 #endif
 }}}

 then I get the compiler output:

 {{{
 1>Linking to lib file(2): boost_filesystem.lib
 1>Linking to lib file(3): libboost_system-vc90-mt-gd-1_44.lib
 }}}

 Looks like the "else" preprocessor section is executed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4902>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC