
I've tried using the regex library in msvc, but keep getting unresolved external errors.. I have; #define BOOST_REGEX_NO_LIB #include <boost/regex.hpp> using namespace boost; Whenever I do a: regex e(".*test.*"); I keep getting a: 1>test.obj : error LNK2019: 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@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AAEAAV12@PBD0I@Z) referenced in function "public: 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> > >::assign(char const *,char const *,unsigned int)" (?assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@QAEAAV12@PBD0I@Z) Yeah I know it's long, but that's the msvc error ;) Any ideas why it won't work?

tintin wrote:
I've tried using the regex library in msvc, but keep getting unresolved external errors..
I have;
#define BOOST_REGEX_NO_LIB #include <boost/regex.hpp> using namespace boost;
Whenever I do a:
regex e(".*test.*");
I keep getting a:
1>test.obj : error LNK2019: 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@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@AAEAAV12@PBD0I@Z) referenced in function "public: 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> >
::assign(char const *,char const *,unsigned int)" (?assign@?$basic_regex@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@boost@@QAEAAV12@PBD0I@Z)
Yeah I know it's long, but that's the msvc error ;)
Any ideas why it won't work?
By defining BOOST_REGEX_NO_LIB you've turned off auto-linking support, so you would need to supply your own build of the regex lib to link against. John.
participants (2)
-
John Maddock
-
tintin