This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: B19: Removing @N's added to symbol names



Adam,

I don't know what version of Cygwin32 gcc you're using, but neither
the binary release (beta 19) nor Mumit Khan's egcs 1.1 for beta 19 behave
this way. They default to producing symbols with an underscore at the beginning,
which is the cdecl calling convention behavior.

Both fastcall and stdcall calling conventions append @<somenumber> to the end of their symbols, and fastcall prepends an @ symbol. the <somenumber> is actually
the number of bytes of the argument list.

To fix your problem, place this in all your source files that define or use
func():

void func( int arg1, int arg2, ... ) __attribute__ ((cdecl));

Make sure you use the exact argument list that you want; I just used examples
above.

>Is there any way that I can get gcc to not add @<somenumber> to the end
>of symbol names?  A DLL that I am using functions from does not have
>this addition but CygWin32 gcc insists on adding it.  Do I have to make
>an object file converter or what?
>
>-- Adam Chlipala
>   psion@tpu.org
>   http://www.tpu.org/~psion/
>   ICQ UIN: 489166
>
>
>  -----BEGIN GEEK CODE BLOCK-----
>  Version: 3.1
>  GCS/L/P/SS d- s:- a--- C++$ UL+ UA+$ UB$ P++ W+++ N+ w+ M- V? PS+++
>PE++ Y+ t++
>  5 X+++ R+++>$ tv b++(+++) DI++ D- G e- h! !r y
>  ------END GEEK CODE BLOCK------
>
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".

****************************************************************
Jeff Horner        The University of Tennessee     CS Department
423 974-2841            fax: 423 974-8296         104 Ayres Hall
http://www.cs.utk.edu/~jhorner/        Knoxville, TN  37996-1301              
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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