This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows dllexport and ISO C binding


Dear Daniel,

Daniel Kraft wrote:
> - The MySQL embedded library uses the
> __declspec(dllexport)
>   convention, which means that names are decorated with
>   @4, @32 etc.
They are not only decorated by @<byte size of the arguments>, but also
the called (and not the calling) procedure pops the arguments from the
stack (STDCALL). Thus just allowing to use @4 in BIND(C) is not the
right solution.

There is no good resolution for GCC 4.4, but we should really do
something about it in GCC 4.5. (Note: This calling system is only used
by Win32 (mostly system dlls), Win64 uses the normal C calling where the
caller pops the arguments from the stack.)

See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34112 and see the
initial patch at http://gcc.gnu.org/ml/fortran/2008-03/msg00007.html

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]