Re: [pcre-dev] Mingw Memory mismatch problem

トップ ページ
このメッセージを削除
著者: Bob Rossi
日付:  
To: Brian Dessent
CC: pcre-dev
題目: Re: [pcre-dev] Mingw Memory mismatch problem
On Tue, Apr 03, 2007 at 02:12:18PM -0700, Brian Dessent wrote:
> 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.


Hi Brain,

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?

Thanks,
Bob Rossi