Mail Archives: djgpp/1998/02/08/10:20:27
In article <25546cf8 DOT 34db5c14 AT aol DOT com>, ChrHenz AT aol DOT com writes
>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.
It would be better to declare and import them as C interfaces. To link
with C++ simply wrap each C interface in a 'static inline' function.
That will generate the correct inline C name whilst also performing
compile time parameter checking.
The only disadvantage is losing link time parameter checking. During
development you would need to manually change the asm function names (or
use a tool to extract them from a C++ file) so it may not be worth
worrying about.
---
Paul Shirley: my email address is 'obvious'ly anti-spammed
- Raw text -