symbol names are not created with stdcall syntax: MINGW, (GCC) 4.3.0 20061021

François-Xavier Coudert fxcoudert@gmail.com
Fri Mar 9 16:07:00 GMT 2007


> 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; }
$ 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 _foo@4
$ gcc.exe b.c -shared -o b.dll -mrtd
$ nm b.dll | grep foo
100011c0 T _foo@4

I think -mrtd doesn't change the name. Maybe GCC needs another option
to add the name decoration automatically? CCing the GCC list and Danny
S. for this question.

FX



More information about the Gcc mailing list