Mail Archives: djgpp/1999/01/25/14:20:56
Florian Janoschek wrote:
> today I started to use NASM and djgpp together and soon encountered the
> following problem:
> GLOBAL _test
> SECTION .text
> _test: push ebp
. . .
> In C++ I wrote something like that:
>
> extern void test(void);
Since your NASM code uses DJGPP's C naming rules, not C++ name
mangling rules, you need to tell C++ that it is a C name. I
never use C++ myself, but I think the syntax is:
extern "C" void test(void);
Alternatively, you could change the NASM code to use the C++
name; But I don't think the rules are documented anywhere, so
you might need to compile the C++ code once with -S in order
to generate a .s file and then look for test in the .s file
to see what the name really looks like.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/
- Raw text -