Boost logo

Boost Users :

Subject: [Boost-users] msvc fail to link with dynamic boost_program_options library
From: Alexey Badyaev (leemouse_at_[hidden])
Date: 2009-10-06 04:04:14


Hi, Boosters!

Volodya, thanks for nice and helpful library: boost_program_options.
But, I have some trouble with that cool lib: when I build my little
program by toolset msvc-9.0 with dynamic boost_program_option, I get
build log:

====================================================================
...patience...
...found 1518 targets...
...updating 38 targets...
common.mkdir C:\projects\ms_dotconf\bin.tmp
common.mkdir C:\projects\ms_dotconf\bin.tmp\libs
common.mkdir C:\projects\ms_dotconf\bin.tmp\libs\tree
common.mkdir C:\projects\ms_dotconf\bin.tmp\libs\tree\test
common.mkdir C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test
common.mkdir
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0
common.mkdir
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug
common.mkdir
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi
common.mkdir
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\cmdline.obj
cmdline.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(120)
: warning C4251:
'boost::program_options::option_description::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::option_description'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(219)
: warning C4251:
'boost::program_options::options_description::m_options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::option_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(225)
: warning C4251:
'boost::program_options::options_description::belong_to_group' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
             _Ty=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(230)
: warning C4251: 'boost::program_options::options_description::groups' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::options_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(120)
: warning C4251: 'boost::program_options::detail::cmdline::args' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::detail::cmdline'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(127)
: warning C4251:
'boost::program_options::detail::cmdline::m_additional_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::pair<std::string,std::string>,
             T0=const std::string &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(128)
: warning C4251:
'boost::program_options::detail::cmdline::m_style_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::vector<boost::program_options::option>,
             T0=std::vector<std::string> &
         ]
c:\devtools\libs\boost_1_40_0\libs\program_options\src\cmdline.cpp(272)
: warning C4800: 'int' : forcing value to bool 'true' or 'false'
(performance warning)
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\config_file.obj
config_file.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\options_description.obj
options_description.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(120)
: warning C4251:
'boost::program_options::option_description::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::option_description'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(219)
: warning C4251:
'boost::program_options::options_description::m_options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::option_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(225)
: warning C4251:
'boost::program_options::options_description::belong_to_group' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
             _Ty=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(230)
: warning C4251: 'boost::program_options::options_description::groups' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::options_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(120)
: warning C4251: 'boost::program_options::detail::cmdline::args' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::detail::cmdline'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(127)
: warning C4251:
'boost::program_options::detail::cmdline::m_additional_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::pair<std::string,std::string>,
             T0=const std::string &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(128)
: warning C4251:
'boost::program_options::detail::cmdline::m_style_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::vector<boost::program_options::option>,
             T0=std::vector<std::string> &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(56) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             _Ty=boost::program_options::basic_option<wchar_t>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(61) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::utf8_encoded_options'
: class 'boost::program_options::basic_parsed_options<charT>' needs to
have dll-interface to be used by clients of class
'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             charT=char
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\parsers.obj
parsers.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(120)
: warning C4251:
'boost::program_options::option_description::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::option_description'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(219)
: warning C4251:
'boost::program_options::options_description::m_options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::option_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(225)
: warning C4251:
'boost::program_options::options_description::belong_to_group' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
             _Ty=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(230)
: warning C4251: 'boost::program_options::options_description::groups' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::options_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(120)
: warning C4251: 'boost::program_options::detail::cmdline::args' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::detail::cmdline'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(127)
: warning C4251:
'boost::program_options::detail::cmdline::m_additional_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::pair<std::string,std::string>,
             T0=const std::string &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(128)
: warning C4251:
'boost::program_options::detail::cmdline::m_style_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::vector<boost::program_options::option>,
             T0=std::vector<std::string> &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(56) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             _Ty=boost::program_options::basic_option<wchar_t>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(61) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::utf8_encoded_options'
: class 'boost::program_options::basic_parsed_options<charT>' needs to
have dll-interface to be used by clients of class
'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             charT=char
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\variables_map.obj
variables_map.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(120)
: warning C4251:
'boost::program_options::option_description::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::option_description'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(219)
: warning C4251:
'boost::program_options::options_description::m_options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::option_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(225)
: warning C4251:
'boost::program_options::options_description::belong_to_group' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
             _Ty=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(230)
: warning C4251: 'boost::program_options::options_description::groups' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::options_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(120)
: warning C4251: 'boost::program_options::detail::cmdline::args' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::detail::cmdline'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(127)
: warning C4251:
'boost::program_options::detail::cmdline::m_additional_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::pair<std::string,std::string>,
             T0=const std::string &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(128)
: warning C4251:
'boost::program_options::detail::cmdline::m_style_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::vector<boost::program_options::option>,
             T0=std::vector<std::string> &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(56) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             _Ty=boost::program_options::basic_option<wchar_t>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(61) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::utf8_encoded_options'
: class 'boost::program_options::basic_parsed_options<charT>' needs to
have dll-interface to be used by clients of class
'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             charT=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(83)
: warning C4251: 'boost::program_options::variable_value::v' : class
'boost::any' needs to have dll-interface to be used by clients of class
'boost::program_options::variable_value'
         c:\devtools\libs\boost_1_40_0\boost/any.hpp(25) : see
declaration of 'boost::any'
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(90)
: warning C4251:
'boost::program_options::variable_value::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::variable_value'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(142)
: warning C4251: 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>::comp' :
struct 'std::less<_Ty>' needs to have dll-interface to be used by
clients of class 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>'
         with
         [
             _Kty=std::string,
             _Ty=boost::program_options::variable_value,
             _Pr=std::less<std::string>,
             _Alloc=std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,
             _Mfl=false
         ]
         and
         [
             _Ty=std::string
         ]
         and
         [
             _Kty=std::string,
             _Ty=boost::program_options::variable_value,
             _Pr=std::less<std::string>,
             _Alloc=std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,
             _Mfl=false
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(142)
: warning C4251: 'std::_Tree_nod<_Traits>::_Alnod' : class
'std::allocator<_Ty>' needs to have dll-interface to be used by clients
of class 'std::_Tree_nod<_Traits>'
         with
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
         and
         [
 
_Ty=std::_Tree_nod<std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>>::_Node
         ]
         and
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(142)
: warning C4251: 'std::_Tree_ptr<_Traits>::_Alptr' : class
'std::allocator<_Ty>' needs to have dll-interface to be used by clients
of class 'std::_Tree_ptr<_Traits>'
         with
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
         and
         [
 
_Ty=std::_Tree_nod<std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>>::_Node *
         ]
         and
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(142)
: warning C4251: 'std::_Tree_val<_Traits>::_Alval' : class
'std::allocator<_Ty>' needs to have dll-interface to be used by clients
of class 'std::_Tree_val<_Traits>'
         with
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
         and
         [
             _Ty=std::pair<const
std::string,boost::program_options::variable_value>
         ]
         and
         [
 
_Traits=std::_Tmap_traits<std::string,boost::program_options::variable_value,std::less<std::string>,std::allocator<std::pair<const
std::string,boost::program_options::variable_value>>,false>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/variables_map.hpp(158)
: warning C4251: 'boost::program_options::variables_map::m_final' :
class 'std::set<_Kty>' needs to have dll-interface to be used by clients
of class 'boost::program_options::variables_map'
         with
         [
             _Kty=std::string
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\value_semantic.obj
value_semantic.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\positional_options.obj
positional_options.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\utf8_codecvt_facet.obj
utf8_codecvt_facet.cpp
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\convert.obj
convert.cpp
compile-c-c++
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\winmain.obj
winmain.cpp
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) :
warning C4275: non dll-interface class 'std::logic_error' used as base
for dll-interface class 'boost::program_options::error'
         C:\Program Files\Microsoft Visual Studio
9.0\VC\INCLUDE\stdexcept(21) : see declaration of 'std::logic_error'
 
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(21) : see
declaration of 'boost::program_options::error'
c:\devtools\libs\boost_1_40_0\boost/program_options/errors.hpp(61) :
warning C4251: 'boost::program_options::ambiguous_option::alternatives'
: class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::ambiguous_option'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(120)
: warning C4251:
'boost::program_options::option_description::m_value_semantic' : class
'boost::shared_ptr<T>' needs to have dll-interface to be used by clients
of class 'boost::program_options::option_description'
         with
         [
             T=const boost::program_options::value_semantic
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(219)
: warning C4251:
'boost::program_options::options_description::m_options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::option_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(225)
: warning C4251:
'boost::program_options::options_description::belong_to_group' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::options_description'
         with
         [
             _Ty=char
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/options_description.hpp(230)
: warning C4251: 'boost::program_options::options_description::groups' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::options_description'
         with
         [
 
_Ty=boost::shared_ptr<boost::program_options::options_description>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/positional_options.hpp(58)
: warning C4251:
'boost::program_options::positional_options_description::m_names' :
class 'std::vector<_Ty>' needs to have dll-interface to be used by
clients of class 'boost::program_options::positional_options_description'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(120)
: warning C4251: 'boost::program_options::detail::cmdline::args' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::detail::cmdline'
         with
         [
             _Ty=std::string
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(127)
: warning C4251:
'boost::program_options::detail::cmdline::m_additional_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::pair<std::string,std::string>,
             T0=const std::string &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/detail/cmdline.hpp(128)
: warning C4251:
'boost::program_options::detail::cmdline::m_style_parser' : class
'boost::function1<R,T0>' needs to have dll-interface to be used by
clients of class 'boost::program_options::detail::cmdline'
         with
         [
             R=std::vector<boost::program_options::option>,
             T0=std::vector<std::string> &
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(56) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::options' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             _Ty=boost::program_options::basic_option<wchar_t>
         ]
c:\devtools\libs\boost_1_40_0\boost/program_options/parsers.hpp(61) :
warning C4251:
'boost::program_options::basic_parsed_options<wchar_t>::utf8_encoded_options'
: class 'boost::program_options::basic_parsed_options<charT>' needs to
have dll-interface to be used by clients of class
'boost::program_options::basic_parsed_options<wchar_t>'
         with
         [
             charT=char
         ]
msvc.link.dll
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\boost_program_options-vc90-mt-gd-1_40.dll
    Creating library
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\boost_program_options-vc90-mt-gd-1_40.lib
and object
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\boost_program_options-vc90-mt-gd-1_40.exp
msvc.manifest.dll
c:\devtools\libs\boost_1_40_0\bin.v2\libs\program_options\build\msvc-9.0\debug\threading-multi\boost_program_options-vc90-mt-gd-1_40.dll
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\main.obj
main.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_clear.obj
tc_clear.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_ctr_copy.obj
tc_ctr_copy.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_ctr_def.obj
tc_ctr_def.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_ctr_fill.obj
tc_ctr_fill.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_insert.obj
tc_insert.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_insert_after.obj
tc_insert_after.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_insert_child.obj
tc_insert_child.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_insert_tree.obj
tc_insert_tree.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_op_assign.obj
tc_op_assign.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_push_pop.obj
tc_push_pop.cpp
compile-c-c++
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tc_swap.obj
tc_swap.cpp
msvc.link
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.exe
main.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)
main.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)
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.exe
: fatal error LNK1120: 2 unresolved externals

         call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 >nul
link /NOLOGO /INCREMENTAL:NO /DEBUG /MACHINE:X86 /subsystem:console
/out:"C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.exe"
 
@"C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.exe.rsp"
         if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

...failed msvc.link
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.exe
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.pdb...
...removing
C:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi\tree.pdb
...skipped
<pC:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi>tree.run
for lack of
<pC:\projects\ms_dotconf\bin.tmp\libs\tree\test\tree.test\msvc-9.0\debug\threading-multi>tree.exe...
...failed updating 2 targets...
...skipped 2 targets...
...updated 34 targets...
=====================================================

You can see: link failed with unresolved externals...
Link with static boost_program_options success, but I need dynamic link.

-- 
With best regards, Alexey Badyaev

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