Extensions in g++ to compile C-code

Raghunath L- CTD, Chennai. raghunathl@ctd.hcltech.com
Tue Dec 16 09:14:00 GMT 2003

Hi All,

I have a library whose source code is written in C language.
The function definition syntax followed is of the form : -
int foo(a,b)
int a;
int b;
    return a+b;

If i need to compile this using g++ compiler, are there any extensions
available to compile the same code without changing the code . If any other
way, pls suggest.

Thanks in advance,

Hi Megha,

 U can use g++ -x c test.c  // where test.c is completely written in 'C'.
                                            // -x option of g++ is used to
specify the language of source


More information about the Gcc-help mailing list