[pcre-dev] PCRE

Top Page
Delete this message
Author: Steven Van Ingelgem
Date:  
To: pcre-dev
Subject: [pcre-dev] PCRE
Hi,


I got 2 issues with your pcre library (8.12) on VS 2005.
I built it via CMake (2.8.4).
set("PCRE_NEWLINE" "ANYCRLF")
set("PCRE_BUILD_PCREGREP" OFF)
set("PCRE_BUILD_TESTS" OFF)
ADD_SUBDIRECTORY(pcre)

The first one is that it cannot resolve 2 symbols at linking time:
1) it cannot find "Init(const char*, const &RE_Options)". Adding this
function in which I simply call the other Init function with string(pattern)
solved it. Weird though as I thought const char* -> std::string was
automatically. Seems not for some reason
2) And it cannot find "class pcrecpp::Arg pcrecpp::no_arg".
1>UpdateCheck_GetVersion.obj : error LNK2001: unresolved external symbol
"class pcrecpp::Arg pcrecpp::no_arg" (?no_arg@pcrecpp@@3VArg@1@A)
1>TA2.lib(TradeFile.obj) : error LNK2001: unresolved external symbol "class
pcrecpp::Arg pcrecpp::no_arg" (?no_arg@pcrecpp@@3VArg@1@A)
>>> But this one I really cannot find. However if I create an object "Arg

no_arg((void*)NULL);" in precpp.cc, everything compiles fine, and links fine
too...


And now I got yet another one, namely that you compare &ptr1 == &no_arg in
FullMatch... But these are different objects. And there is no "bool
operator==(const Arg& a) const { return arg_ == a.arg_; }" defined... If you
add this operator, it works as expected.



Grtz,
Steven