Linking C and C++ together

Eljay Love-Jensen eljay@adobe.com
Thu Apr 21 16:52:00 GMT 2005


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



More information about the Gcc-help mailing list