Re: [boost] [regex]using boost::regex with STLport 5.0 on VS.net

sorry, the error msg is: BoostTest.obj : error LNK2019: missing symbol "void __cdecl boost::re_detail::raise_runtime_error(class _STL::runtime_error const &)" (?raise_runtime_error@re_detail@boost@@YAXABVruntime_error@_STL@@@Z) ,referenced in "void __cdecl boost::re_detail::raise_error<struct boost::regex_traits_wrapper<struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > >(struct boost::regex_traits_wrapper<struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > const &,enum boost::regex_constants::error_type)" (??$raise_error@U?$regex_traits_wrapper@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@@re_detail@boost@@YAXABU?$regex_traits_wrapper@U?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@1@W4error_type@regex_constants@1@@Z) BoostTest.obj : error LNK2019: missing symbol "class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > __cdecl boost::re_detail::w32_transform(unsigned long,char const *,char const *)" (?w32_transform@re_detail@boost@@YA?AV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@KPBD0@Z) ,referenced in "public: class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > __thiscall boost::w32_regex_traits<char>::transform(char const *,char const *)const " (?transform@?$w32_regex_traits@D@boost@@QBE?AV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PBD0@Z) Thanks.

Errors like this usually arise either because: 1) You haven't defined __STL_DEBUG when building a debug build (the prebuilt lib's do this so you have to in order to link to them). However if this is the case you should have got a #error from the autolinking code telling you of the problem. 2) You're build of Boost did not in fact get built against STLport. Try taking a peek at the symbols defined in the libraries to see if they're using _STL or _STLD names (from STLport) or std:: names (from VC++). Also try building with bjam and the -d2 option so you can see the command lines generated and verify that all the paths are in fact correct. John.
participants (2)
-
John Maddock
-
Wang Weiwei