JD>I would like to see a very small example, without error checking or any
JD>other extra stuff, of "wrapping a c module to work in C++".
JD>I have seen it mentioned several times but never ex-plain-ed. :(
Just declare the functions
extern 'C'{
... declerations ...
}
This prevents the compiler from mangling the function names - this
technique is used to check for error by C++. But if you're not using
Assembler for your functions, you don't need to do anything to your
source. ;-)
Hope that helps :)
--- FMail 0.92
# SLMR 2.1 # 100% Compression: del *.*
---------------
* Origin: The Programmer's Oasis on FIDONET! (1:348/203)
|