This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Using object compile with gcc with g++
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Ernst Damien <dernst at ulg dot ac dot be>, gcc-help at gcc dot gnu dot org
- Date: Fri, 03 Oct 2003 06:37:11 -0500
- Subject: Re: Using object compile with gcc with g++
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