Ross Ridge wrote:
> Any library that needs to be able to be called from VisualBasic 6 or some
> other "stdcall only" environment should explictly declare it's exported
> functions with the stdcall calling convention.
Tobias Burnus writes:
> Thus, if I understood you correctly, you recommend that w
Ross Ridge wrote:
> Danny Smith writes:
>> Unless you are planning to use a gfortran dll in a VisualBasic app, I
>> can see little reason to change from the default "C" calling convention
>
> FX Coudert writes:
>> That precise reason is, as far as I understand, important for some
>> people. Fortran
Danny Smith writes:
>Unless you are planning to use a gfortran dll in a VisualBasic app, I
>can see little reason to change from the default "C" calling convention
FX Coudert writes:
>That precise reason is, as far as I understand, important for some
>people. Fortran code is used for internal rout
IMO, anybody who uses -mrtd (with or without decorations) is asking
for
trouble.
Unless you are planning to use a gfortran dll in a VisualBasic app, I
can see little reason to change from the default "C" calling
convention.
That precise reason is, as far as I understand, important for some
>
> On mingw, I get the following:
>
> $ cat a.c
> int foo(int x) { return x+1; }
> $ gcc.exe -mrtd a.c -shared -o a.dll
> $ nm a.dll | grep foo
> 100011c0 T _foo
>
> $ cat b.c
> int __stdcall foo(int x) { return x+1; }
> $ gcc.exe b.c -shared -o b.dll
> $ nm b.dll | grep foo
> 100011c0 T [EMA
It might be considered a backend issue, but in general it
is a binutils (so OP is in the wrong list!).
I beg to disagree with the "in general it is a binutils issue" part.
One of the posters explained why the information needed for name
decoration can't be determined at link-time (nor at assembl
Thus we may consider adding a -fstdcall option to gfortran, which
appends the @n. The -mrtd would be needed additionally and it seems to
work. (That I don't get @n in C for __stdcall might because I tested
under Linux.)
On mingw, I get the following:
$ cat a.c
int foo(int x) { return x+1; }
$ g