From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: attribute stdcall Date: Wed, 26 Apr 2000 16:55:04 +0200 Organization: NetVision Israel Lines: 19 Message-ID: <39070348.732B115A@is.elta.co.il> References: <8AyN4.3395$fv3 DOT 5373032 AT nnrp6 DOT proxad DOT net> NNTP-Posting-Host: ras1-p116.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 956757284 9186 62.0.172.118 (26 Apr 2000 13:54:44 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 26 Apr 2000 13:54:44 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexandre Devaure wrote: > > Has sombody ever had compilation problem with a function declared with the > attribute stdcall with gcc 2.95? > > static bool F_WriteWords(int *_VP_Addr,int _V_Off,int _V_Lng) > __attribute__((stdcall)); > static bool F_WriteWords(int *_VP_Addr,int _V_Off,int _V_Lng) > { > body > } > > the result is : > bmra.c:120: previous declaration of `F_WriteWords' > bmra.c:165: conflicting types for `F_Init' Your prototype disagrees with the function's definition, so the compiler complains. You need to use the __attribute__((stdcall)) thing in the definition as well, and then it will work.