Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit,regex] Linking problems in VS 2008
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-04-03 06:45:15


Adam Badura wrote:
> I am using regex_p parser in Spirit. This uses Boost.Regex. The code
> compiles fine but does not link. Error messages are (debug mode, static
> linking, Boost 1.42):
> --------------------
> 1>configuration.obj : error LNK2019: unresolved external symbol "public:
> void __thiscall boost::re_detail::raw_storage::resize(unsigned int)"
> (?resize_at_raw_storage_at_re_detail_at_boost@@QAEXI_at_Z) referenced in function
> "public: void * __thiscall
> boost::re_detail::raw_storage::extend(unsigned int)"
> (?extend_at_raw_storage_at_re_detail_at_boost@@QAEPAXI_at_Z)
> 1>configuration.obj : error LNK2019: unresolved external symbol "public:
> void * __thiscall boost::re_detail::raw_storage::insert(unsigned
> int,unsigned int)" (?insert_at_raw_storage_at_re_detail_at_boost@@QAEPAXII_at_Z)
> referenced in function "public: struct boost::re_detail::re_syntax_base
> * __thiscall boost::re_detail::basic_regex_creator<char,struct
> boost::regex_traits<char,class boost::cpp_regex_traits<char> >
> >::insert_state(int,enum boost::re_detail::syntax_element_type,unsigned
> int)"
> (?insert_state@?$basic_regex_creator_at_DU?$regex_traits_at_DV?$cpp_regex_traits_at_D@boost@@@boost@@@re_detail_at_boost@@QAEPAUre_syntax_base_at_23@HW4syntax_element_type_at_23@I_at_Z)
>
> 1>D:\Studies\Thesis\Debug\prover.exe : fatal error LNK1120: 2 unresolved
> externals
> --------------------
>
> The interesting thing is that if I turn language extensions on (/Za
> option) in the project the problem disappears.

I believe this option changes ABI, therefore both your project and Boost.Regex must
be build with the same value of this option.

Does this help?

- 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