Mail Archives: djgpp/1998/04/15/07:46:30
From: | "DeHackEd" <Not DOT given AT out>
|
References: | <01bd6822$b737b4e0$99a325cb AT jring>
|
Subject: | Re: Compiling C and C++ in same project
|
Date: | Wed, 15 Apr 1998 07:42:29 -0400
|
Lines: | 22
|
Message-ID: | <OwNusNGa9GA.89@uppubnews03>
|
Newsgroups: | comp.os.msdos.djgpp
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
As an ANSI C++ rule, anything inside the
extern "C"
{
// insert stuff here
};
is to be saved in a format C can read. You are free to use C++ classes,
templates, etc. in this block, but your C code cannot access them without an
exact name. Also, function overloading will not work because extern "C" tells
C++ not to use the name__Fdata format for function names, which is how
overloading works.
Otherwise, you can rename all .c files to .cpp and see what happens. Keep a list
of the ones you change though. C++ is not as forgiving as C.
--
"DeHackEd"
EMail address not given out due to low-life spammers.
- Raw text -