Boost logo

Boost Users :

Subject: [Boost-users] How to use boost::regex source code without using any *.lib file
From: Jun Wan (junjun.wanjun_at_[hidden])
Date: 2009-02-16 21:56:40


---------- Forwarded message ----------
From: Jun Wan <junjun.wanjun_at_[hidden]>
Date: 2009/2/17
Subject: How to use boost::regex source code without using any *.lib file
To: boost-users_at_[hidden]

Hello,
    Recently I used boost::regex in my project(VS2005 IDE). It works well
with linking the lib file. But I want to use the source code of
boost::regex.I include the regex.hpp in the project and used
BOOST_REGEX_NO_LIB macro; But I got such error infomation when linking the
code.

error LNK2001: unresolved external symbol "private: class
boost::basic_regex<char,struct boost::regex_traits<char,class
boost::w32_regex_traits<char> > > & __thiscall
boost::basic_regex<char,struct boost::regex_traits<char,class
boost::w32_regex_traits<char> > >::do_assign(char const *,char const
*,unsigned int)" (?do_assign@?$basic_regex_at_DU?$regex_traits_at_DV
?$w32_regex_traits_at_D@boost@@@boost@@@boost@@AAEAAV12_at_PBD0I@Z)

error LNK2001: unresolved external symbol "private: void __thiscall
boost::re_detail::perl_matcher<char const *,class std::allocator<struct
boost::sub_match<char const *> >,struct boost::regex_traits<char,class
boost::w32_regex_traits<char> > >::construct_init(class
boost::basic_regex<char,struct boost::regex_traits<char,class
boost::w32_regex_traits<char> > > const &,enum
boost::regex_constants::_match_flags)" (?construct_init@?$perl_matcher_at_PBDV
?$allocator_at_U?$sub_match_at_PBD@boost@@@std@@U?$regex_traits_at_DV
?$w32_regex_traits_at_D@boost@@@boost@@@re_detail_at_boost
@@AAEXABV?$basic_regex_at_DU?$regex_traits_at_DV?$w32_regex_traits_at_D@boost@
@@boost@@@3_at_W4_match_flags_at_regex_constants_at_3@@Z)

error LNK2001: unresolved external symbol "public: bool __thiscall
boost::re_detail::perl_matcher<char const *,class std::allocator<struct
boost::sub_match<char const *> >,struct boost::regex_traits<char,class
boost::w32_regex_traits<char> > >::find(void)" (?find@?$perl_matcher_at_PBDV
?$allocator_at_U?$sub_match_at_PBD@boost@@@std@@U?$regex_traits_at_DV
?$w32_regex_traits_at_D@boost@@@boost@@@re_detail_at_boost@@QAE_NXZ)

I want to know why I can't use the source code of boost::regex. Is there any
thing I need to do? Any help will be appreciated!

Thank you!

Jun



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