------- You are receiving this mail because: -------
You are on the CC list for the bug.
http://bugs.exim.org/show_bug.cgi?id=981
Summary: pcrecpp usage as static lib and MSVC 2008
Product: PCRE
Version: 7.9
Platform: x86-64
OS/Version: Windows
Status: NEW
Severity: bug
Priority: low
Component: Code
AssignedTo: ph10@???
ReportedBy: vincent.bourdier@???
CC: pcre-dev@???
Hi all,
Including pcrecpp.h in my projet, I get compil errors like :
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport)
public: __thiscall pcrecpp::RE::RE(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(__imp_??0RE@pcrecpp@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
referenced in function "public: static bool __cdecl RegEx::Match(class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>,class std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,bool)"
(?Match@RegEx@@SA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z)
There are two way to fix them :
* First one is to use a define before including the file
#define PCRE_STATIC 1
#include <pcrecpp.h>
* Second one is to use /clr option in the projet configuration.
I would like to know why the #define is necessary, because I compile PCRE as
static lib using Cmake.
I did not saw anything about that in the documentation.
Whatever, thanks for this good library :-)
Regards,
Vincent.
--
Configure bugmail:
http://bugs.exim.org/userprefs.cgi?tab=email