Re: [pcre-dev] Mingw Memory mismatch problem

Góra strony
Delete this message
Autor: Brian Dessent
Data:  
Dla: Bob Rossi
CC: pcre-dev
Temat: Re: [pcre-dev] Mingw Memory mismatch problem
Bob Rossi wrote:

> One other question. Is the auto-import feature some magic that will only
> work in the mingw/msys environment? If we use the patch you suggested,
> and someone builds a mingw dll of pcre, would it be possible to link
> that to a msft cl program or do you think it would give link errors?


As far as I know, the actual DLL produced would be identical either way;
the real question is the header. I'm pretty sure the MS toolchain is
capable of linking without __declspec(dllimport) on the function
prototypes as long as you use an import library to link with. It
probably can't deal with DATA imports without __declspec though, so in
order to be able to override any of those function pointers the compiler
would have to see a dllimport declaration. [ But this is based on a
faint recollection of a Raymond Chen blog post, so if it really matters
you should probably test it and not take my word for it. ]

The only time there would be any actual magic bits in the library that
depend on the runtime would be if you use the
--enable-runtime-pseudo-reloc stuff.

Brian