From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Djgpp with nasm Problem Date: Mon, 01 Nov 1999 17:54:47 -0500 Lines: 23 Message-ID: <381E1A37.B41@erols.com> References: <38187267 DOT 4D01 AT wanadoo DOT fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: VFSII+9//sEl4cxcHmKtnd5NelocZcTd2aqxad+ErGI= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 1 Nov 1999 22:57:23 GMT X-Mailer: Mozilla 3.01 (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Nassim Bouayad wrote: > > Hi,I have problrem for arguments with nasm,I have a function that is > writed with nasm,but when I compile it,the compiler mamke an error: > undefinied reference to LoadPcx(char *,char *) ... > extern int LoadPcx(char *,char *); ... > [GLOBAL _LoadPcx__FPcPc] I don't know the name mangling rules, but I just compiled that line with DJGPP and it mangled that name to _LoadPcx__FPcT0, not to _LoadPcx__FPcPc. If you don't have OBJDUMP or you aren't using it, then you should get it and use it. Before you declare a C++ routine in NASM you should declare it in a tiny .cpp file and "gcc -c" it to a .o file and "objdump --syms" it to see how the names got mangled (or you could "gcc -S" the .cpp file and edit the resulting .s file). -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/