Re: [pcre-dev] pcrecpp_unittest failed in 7.2 on Mingw32

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: andy wang
CC: pcre-dev
Tárgy: Re: [pcre-dev] pcrecpp_unittest failed in 7.2 on Mingw32
On Wed, 4 Jul 2007, andy wang wrote:

> Hi, Philip
>
> Sorry to bother you but I can't find user group or mail list to post
> this problem.


For future reference: pcre-dev@???. I'm copying this reply to the
list.

> I download the pcre-7.2 on www.pcre.org and compiled on Mingw32+XP.
> After fixed a minor problem (replace dllimport with dllexport in
> pcreposix.h) now it works fine.


To others on this list: Is this an change that should be made to the
base source? By comparison with pcre.h, it might be that the correct
change would be to wrap this code in #ifndef PCRE_EXP_DECL instead. [As
most of you know, I have no way of testing Windows things.]

> When I run the pcrecpp_unittest, it
> stopped at
> $ .libs/pcrecpp_unittest.exe
> Testing FullMatch
> pcrecpp_unittest.cc:918: Check failed: v == max_value
>
> From http://www.mingw.org/MinGWiki/index.php/long%20long I found that
> if using "%I64d" instead of "%lld" will fix that problem.


Neither am I familiar with C++. Is I64 a standard thing in C++? It isn't
in C. Aha! That web page says this: "The printf() implementation used by
MinGW (which is provided by msvcrt.dll) uses its own format specifier
for 64-bit integers..." If it really is "it's own format" then we cannot
put it into the PCRE source just like that. I suppose we could invent a
.configure option such as --with-64bit-format=I64 and parameterize it.

Or can we detect MinGW automatically, and use it in that case only?

Craig, can you comment on this C++ issue, please?

> Regards,
> Andy


Thanks,
Philip

--
Philip Hazel, University of Cambridge Computing Service.