|
Boost Users : |
From: John Maddock (john_at_[hidden])
Date: 2007-01-18 04:39:43
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_at_DU?$regex_traits_at_DV?$w32_regex_traits_at_D@boost@@@boost@@@boost@@AAEAAV12_at_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_at_DU?$regex_traits_at_DV?$w32_regex_traits_at_D@boost@@@boost@@@boost@@QAEAAV12_at_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.
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