From: "Florian Janoschek" Newsgroups: comp.os.msdos.djgpp Subject: NASM function -> undefined reference Date: Mon, 25 Jan 1999 18:15:00 +0100 Lines: 40 X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 NNTP-Posting-Host: max4.donau.de Message-ID: <36aca701.0@news.zeitung-online.net> X-Trace: 25 Jan 1999 18:16:49 +0100, max4.donau.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello, today I started to use NASM and djgpp together and soon encountered the following problem: The code of the assembly file is about like this: BITS 32 GLOBAL _test SECTION .text _test: push ebp mov ebp, esp pop ebp ret SECTION .data GLOBAL _Mist _Mist: dd 0xdeadbeef In C++ I wrote something like that: extern void test(void); extern unsigned int Mist; ... ... test(); cout << '\n' << hex << Mist; Several times I tried to "build all", removed and added again all that underbars in front of the function names, but the effect was every time, that "Mist" worked very well, but "test()" caused the nasty error message "undefined reference to test(void)". What have I done wrong? -- Best regards, Florian Janoschek http://blubisoftware.notrix.de