Further to this, I have noticed that the
linking error only happens when I use:
boost::wregex
expr(L"[\\s]");
instead of:
boost::regex
expr("[\\s]");
so now why can’t I use
the wide regex type in the static library?
From: Martin Zeng
Sent: Monday, 7 May 2007 2:14 PM
To: 'boost-users@lists.boost.org'
Subject: Having trouble including
my static library (which uses regex) in my MFC app
Hi guys,
I have a static library in which I have included the boost
regex header. This static library compiles fine with no errors.
But then I want to use this static library in an MFC
application I made.
I keep getting the following linking error:
error LNK2005: "public: static unsigned int __cdecl
std::char_traits<unsigned short>::length(unsigned short const *)"
(?length@?$char_traits@G@std@@SAIPBG@Z) already defined in
msvcprtd.lib(MSVCP71D.dll)
What is the problem and how can I solve it?
Thanks