[Boost-bugs] [Boost C++ Libraries] #13326: linking with program_options has unresolved symbols on MSVC

Subject: [Boost-bugs] [Boost C++ Libraries] #13326: linking with program_options has unresolved symbols on MSVC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-12-06 09:59:32


#13326: linking with program_options has unresolved symbols on MSVC
----------------------------------------+-----------------------------
 Reporter: Mario Emmenlauer <mario@…> | Owner: Vladimir Prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
----------------------------------------+-----------------------------
 I'm developing a simple command line client application against
 boost::program_options. Everything works fine on Linux with gcc-4.8,
 gcc-5.3 and gcc-6.3, on Darwin with XCode 7 and on Windows with MinGW-w64.
 But on Windows with MSVC Build Tools 2017 x64 I get two unresolved
 symbols:

 {{{
 LightBISClientCMDLine.cc.obj : error LNK2001: unresolved external symbol
 "class std::basic_string<char,struct std::char_traits<char>,class
 std::allocator<char> > boost::program_options::arg"
 (?arg_at_program_options_at_boost@@3V?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@A)
 LightBISClientCMDLine.cc.obj : error LNK2001: unresolved external symbol
 "public: static unsigned int const
 boost::program_options::options_description::m_default_line_length"
 (?m_default_line_length_at_options_description_at_program_options_at_boost@@2IB)
 }}}

 I checked program_options.dll and I am under the impression that those two
 symbols are defined there. I get exact matches for
 {{{?arg_at_program_options_at_boost@@3V?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@A}}}
 and
 {{{?m_default_line_length_at_options_description_at_program_options_at_boost@@2IB}}}.
 Also all other symbols from program_options are resolved correctly. Here
 is the details build log with a verbose linker message:
 http://data.biodataanalysis.de/tmp/boost_program_options_linker_error_emmenlau.txt

 I am explictily setting preprocessor defines for debug, and I set to code
 to build for C++14. Is that possibly related?

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13326>
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-12-06 10:06:17 UTC