Using object compile with gcc with g++

Eljay Love-Jensen eljay@adobe.com
Fri Oct 3 11:37:00 GMT 2003


HI Ernst,

If these are your C functions/globals...

double global_River = 3.0;
int global_Dance = 7;

void Foo(void)
{
  // Do something wonderful.
}

double Bar(int a, int b, int c)
{
  // Do something amazing.
}

You should have this in your C++ header file for these C functions/globals...

extern "C" double global_River;
extern "C" int global_Dance;
extern "C" void Foo();
extern "C" double Bar(int a, int b, int c);

HTH,
--Eljay




More information about the Gcc-help mailing list