Mail Archives: djgpp/1998/11/17/12:16:56
From: | "Johan Venter (aka sphinX)" <^_^@delorie.com>
|
Newsgroups: | comp.os.msdos.djgpp
|
References: | <72ifbf$4qm$1 AT news DOT metronet DOT de>
|
Subject: | Re: NASM "name mangling"
|
Date: | Tue, 17 Nov 1998 21:50:22 +1100
|
Lines: | 34
|
MIME-Version: | 1.0
|
X-Newsreader: | Microsoft Outlook Express 4.72.3110.5
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
NNTP-Posting-Host: | 203.40.82.63
|
Message-ID: | <36516beb.0@139.134.5.33>
|
X-Trace: | 17 Nov 1998 22:28:27 +1000, 203.40.82.63
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I had a similar problem in which I had a large asm file of graphics functions, all
declared for c++, such as:
[GLOBAL _foo_Fii]
I had about 15 functions in this file and nasm worked fine on the file.
I had a function like this one:
[GLOBAL _blit_FPUiPUiUi]
and when i compiled my source and used this function, gcc returned 'undefined reference'.
to get it working i had to declare all my asm functions in the asm file without the
arguments, like so:
[GLOBAL _foo]
and then in my h file for the source declare my asm functions like this:
extern 'C' {
extern foo(unsigned int *, unsigned int *, unsigned int);
}
This fixed my problem.
It seemed that either gcc or nasm didn't like that long function name,
so if your functions don't require overloading, use extern 'C' {};
--
sphinX
e-mail: sphinx AT iname DOT com
icq: 3643877
Felix wrote in message <72ifbf$4qm$1 AT news DOT metronet DOT de>...
- Raw text -