|
Boost : |
From: Martyn Woerner (martyn.woerner_at_[hidden])
Date: 2005-06-16 12:10:08
Hi Folks,
I'm a newbie gingerly moving over from MFC. I have built and installed
regex from the boost_1_32_0 package without any obvious problem. Now I've
included the simplest use of regex taken from the overview and:
a) I get a compile error in regbase.hpp. As a temporary workaround I've
tried using V3 instead and:
b) I get a link error (debug & release)
Can someone help me overcome this please? Many thanks.
I have:
#include <boost/cregex.hpp>
//#define BOOST_REGEX_V3
#include <boost/regex.hpp>
using namespace boost;
...
// regexp test
const std::string s = "sdflsjhslad";
static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
if (regex_match(s, e))
ASSERT(true);
else;
ASSERT(true);
...
which gives the following:
Compiling...
StdWbApp.cpp
c:\projects\boost_1_32_0\boost\regex\v4\regbase.hpp(120) : error C2955:
'collate' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\include\locale(67) :
see declaration of 'collate'
c:\projects\boost_1_32_0\boost\type_traits\detail\wrap.hpp(16) : fatal error
C1506: unrecoverable block scoping error
and if I use V3 I get the link errors:
StdWbApp.cpp
Linking...
StdWbApp.obj : error LNK2001: unresolved external symbol "protected: void
__cdecl boost::re_detail::match_results_base<char const *,class
boost::detail::allocator_adapter<char,class boost::detail::simple_alloc>
>::m_free(void)" (?m_free@?$match_resu
lts_base_at_PBDV?$allocator_adapter_at_DVsimple_alloc_at_detail@boost@@@detail_at_boost@@@re_detail_at_boost@@IAAXXZ)
StdWbApp.obj : error LNK2001: unresolved external symbol "public: __thiscall
boost::re_detail::match_results_base<char const *,class
boost::detail::allocator_adapter<char,class boost::detail::simple_alloc>
>::match_results_base<char const *,class bo
ost::detail::allocator_adapter<char,class boost::detail::simple_alloc>
>(class boost::detail::allocator_adapter<char,class
boost::detail::simple_alloc> const &)"
(??0?$match_results_base_at_PBDV?$allocator_adapter_at_DVsimple_alloc_at_detail@boost@@@detail_at_b
oost@@@re_detail_at_boost@@QAE_at_ABV?$allocator_adapter_at_DVsimple_alloc_at_detail@boost@@@detail_at_2@@Z)
StdWbApp.obj : error LNK2001: unresolved external symbol "public: void
__cdecl boost::re_detail::match_results_base<char const *,class
boost::detail::allocator_adapter<char,class boost::detail::simple_alloc>
>::set_size(unsigned int,char const *,cha
r const *)"
(?set_size@?$match_results_base_at_PBDV?$allocator_adapter_at_DVsimple_alloc_at_detail@boost@@@detail_at_boost@@@re_detail_at_boost@@QAAXIPBD0_at_Z)
... and so on
Debug/StdWb.exe : fatal error LNK1120: 9 unresolved externals
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk