> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]Im Auftrag von Andrej Borsenkow
> Gesendet am: Sonntag, 13. Mai 2001 11:43
> An: Jesper Eskilson
> Cc: Alan Hourihane; [EMAIL PROTECTED]
> Betreff: Re: function pointers & DLL's
>
> On Sun, 13 May 2001, Jesper Eskilson wrote:
>
> > On Sun, 6 May 2001, Alan Hourihane wrote:
> >
> > > Everything works fine. But what I'm trying to do is find a
> way at the linker
> > > stage that negates me having to make these __declspec
> statements. Is there
> > > any way this is possible ?
> >
> > For VC++ (at least) __declspec(dllimport) is purely optional and never
> > required. The only this they do is to enable the compiler to skip an
> > indirection in the jump and generate a slightly more efficient jump.
> >
>
> For GCC (at least :-) __declspec(dllimport) is optional for functions but
> is mandatory for variables. The side-effect of the above is, that function
> address is no more static and cannot be used as static initializer, e.g.
> in function dispatch table like
>
That's not right. Paul Sokolvsky has written an ld patch named auto-import
initial for mingw, which is adapted to cygwin. Look into the appended files.
If you like, you can have this patched ld by mail and try it out.

Regards

Ralf Habacker
EMail: [EMAIL PROTECTED]
       [EMAIL PROTECTED]

dll.c

Makefile

client.c

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

Reply via email to