This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking C and C++ together


Hi Daniel,

Let's say I have a C function:

int DoSomething(int i, char c, double d);

In C++, this function is declared:

extern "C" int DoSomething(int i, char c, double d);

Or as:

extern "C" {
int DoSomething(int i, char c, double d);
}

Are the C functions that have C linkage declared this way in the C++ translation units?

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]