Mail Archives: djgpp/1998/02/06/13:55:59
>dont quote me on this 'im fairly new to c++. I had a simular problem
>when I wanted to link some asm routines into a djgpp prog.
>at first it was just a normal .c prog and I used the simular conventions
>as above
>and all was ok.,but when I included some c++ code, and renamed to .cc to
>compile as a c++ prog,
>the compiler couldnt find the asm routines, so I used
>extern "C" void my_asm_routine(int,int);
>in the function declaration and it worked, i think its something to do
>with differences in name conventions between C and C++ progs in the
>object files????
You can also declare the function correctly in the ASM source so it can be
interfaced by C++ progs. I remember that you have to append a specification of
the expected parameters to the name (something like GLOBAL _Test_V, V stands
for void. Sorry, I don't know exactly anymore, but I guess the documentation
should help you).
Christian.
- Raw text -