Autor: Bob Rossi Fecha: A: Brian Dessent Cc: pcre-dev Asunto: Re: [pcre-dev] Mingw Memory mismatch problem
On Tue, Apr 03, 2007 at 03:01:26PM -0700, Brian Dessent wrote: > 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.
Hi Brian,
OK, so Philip, this approach may not work when users use this DLL with a
msft tool chain. It also may. :)
So, either, in future releases we get the declspec correct (leave that
to someone that knows what they are doing and wants the functionality?)
or we tell them to use the CMake support.
Does that sound correct?
If so, I think we should put in the NON-UNIX-USE file this information
under the mingw section. Cause I for one will forget all of this by next
week.