Hi Bob, Howard, others, * Bob Friesenhahn wrote on Wed, Apr 27, 2005 at 06:34:47PM CEST: > On Wed, 27 Apr 2005, Howard Chu wrote: > >> > >>Related question: Do I have to specify the declspec(export) in the same > >>translation unit in which I define the function? This is what bugs us > >>in mingw ATM. Specifying the declspec in another translation unit > >>seems to work with cygwin but fail on mingw. (Of course, the unit gets > >>linked into the same lib in any case). > > > >Yes, I think so, but not entirely sure. Since all the code I work with > >always puts the declarations in a header file that every source file > >includes, it has never been an issue for me. > > The declarations should be consistently applied across all translation > units in the same DLL. If a function prototype is supplied, then it > should be appropriately scoped during compilation.
Well, just to satisfy this rule we would need to break binary compatibility on win32, since the *_preloaded_symbols lists created on the fly in `libtool' might need them. As far as I understand, it would be much easier though to do the right thing[tm] and replace them with accessor functions right away. This has the additional small benefit that we only need break once -- we could do the accessor functions for object and functions symbols correctly right away (TODO 1.2, first entry). > >I see that more recent versions of cygwin/mingw appear to have made using > >declspec unnecessary: > This assumes that libtool should only support the GCC compiler under > Windows. Microsoft, Borland, and others, need not apply. Is there a > good reason to rule out all compilers except for GCC? I agree with Bob. Unless there is compelling reason against keeping support in, we should. Obviously, there is no reason against optimizing the case where we have a good linker either. BTW: Does anyone have access to non-gcc compilers on win32 and some incentive to test Libtool HEAD with them? We need more test coverage there (and probably a couple of patches, too). Regards, Ralf