TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JOHN DUMAS
from: ADAM MAJER
date: 1998-01-01 13:50:00
subject: C rap

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.