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

2007-03-12 Thread Ross Ridge
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

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

2007-03-10 Thread Tobias Burnus
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

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

2007-03-10 Thread Ross Ridge
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

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

2007-03-10 Thread FX Coudert
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

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

2007-03-09 Thread Danny Smith
> > 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

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

2007-03-09 Thread François-Xavier Coudert
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

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

2007-03-09 Thread François-Xavier Coudert
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