Re: [pcre-dev] PCRE2 first Release Candidate

Etusivu
Poista viesti
Lähettäjä: Maël Hörz
Päiväys:  
Vastaanottaja: pcre-dev
Aihe: Re: [pcre-dev] PCRE2 first Release Candidate
> Can you post the errors? I have no access to any Windows systems,
> but from the errors I might be able to work out what is going on.
> Better still if you can post a fix. :-) [Or send it to me direct.]

It took me a while to find out the cause since I am not that familiar
with CMAKE and some preprocessor "magic" was throwing me off track
(which is why I gave up initially).

But it turns out there are two different function prototypes for
_pcre2_memctl_malloc.

in "pcre2_internal.h":
extern void *       _pcre2_memctl_malloc(size_t, pcre2_memctl *);



and "pcre2_context.c":

PCRE2_EXP_DEFN void *
PRIV(memctl_malloc)(size_t size, pcre2_memctl *memctl)
{
...
}

I suppose that PCRE2_EXP_DEFN, which expands to "extern
__declspec(dllexport)", should be replaced in "pcre2_context.c" with
"extern" so that both prototypes match. It compiles that way, and
assuming no other code references this from another shared library, we
should be good.