Boost logo

Boost Users :

From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-09-03 07:26:10


Olaf Peter wrote:

> Hi,
>
> I've got the linker error LNK2005
> (http://msdn.microsoft.com/en-us/library/72zdcz6f(VS.80).aspx) using
> MSVC80 (Studio 2005):
>
> libboost_program_options-vc80-mt-1_35.lib(value_semantic.obj) : error
> LNK2005: "public: __thiscall
> boost::program_options::invalid_option_value::invalid_option_value(class
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> > const &)"
> (??0invalid_option_value_at_program_options_at_boost@@QAE_at_ABV?$basic_string_at_DU?$char_traits_at_D@std@@V
$allocator_at_D@2@@std@@@Z)
> ist bereits in
> boost_program_options-vc80-mt-1_35.lib(boost_program_options-vc80-mt-1_35.dll)
> definiert.

BTW, it's better to use English locale so that your errors message are clear
to everybody.

It appears that one part of your applications links to libboost_program_options-vc80-mt-1_35.lib
(static library) while another links to boost_program_options-vc80-mt-1_35.lib (import lib).
The only reason I can imagine for that is that parts of your applications are built with
different settings -- in particular BOOST_ALL_DYN_LINK macro. Try cleaning everything,
making sure that macro is set the the same value everywhere, and try again.

- Volodya


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