Re: [pcre-dev] Mingw Memory mismatch problem

Kezdőlap
Üzenet törlése
Szerző: Brian Dessent
Dátum:  
Címzett: pcre-dev
Tárgy: Re: [pcre-dev] Mingw Memory mismatch problem
Philip Hazel wrote:

> Earlier versions of PCRE produced by me would just have had the normal
> extern stuff because I know nothing about Windows. Somebody sent me the
> __declspec additions. I wonder why? Maybe it was somebody who felt
> strongly about exporting "private" symbols. The ChangeLog notes that it
> was added for PCRE 6.0, 07-Jun-05, but doesn't record who sent it.


Well, the ability to get unix-like library linking semantics without
having to sprinkle __declspec all over the place is somewhat new...
although looking at the ld changelogs it looks like it's been there
since around late 2001. Maybe I'm thinking of the "pseudo relocs"
feature (which lets you use more complex data types like structs without
dllimport) which is newer but still way before 2005 era. And anyway the
native MS toolchain doesn't have any of this, so people that come from
that background are used to having to do it.

There is also a small gotcha that the auto-exports feature is only
turned on in the default case if there are no explicit
__declspec(dllexport)'s present in any object. This can be a problem if
one of the libraries your package utilizes changes their headers to
start explicitly tagging things as exported, as now suddenly you either
have to do it too, or you have to pass some -Wl,--export-all-symbols
kind of option. I think this scenario recently reared its head with m4
and libltdl/libtool.

Brian