This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Trouble Compiling c++ file on Linux platform and eclipse IDE
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: rebelstar <kishore3385 at yahoo dot co dot in>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 2 Feb 2012 20:31:20 +0000
- Subject: Re: Trouble Compiling c++ file on Linux platform and eclipse IDE
- References: <33252593.post@talk.nabble.com>
On 02/02/2012, rebelstar wrote:
>
> Hello,
>
> I have a C file and .h file which i can easily compile on a 64 bit linux
> platform.( Through eclipse IDE. In the compiler option, i enable -std=c99.
>
>
> Now, with the same file, i want to compile it on c++ compiler. (the gcc
> compiler version i am using is 4.2.2)
>
> So i add extern c to the .h files and rename the .c file to c++.
> I used g++ compiler when i got the error " enable c99 compiler option.
That doesn't look like a GCC error, what's the exact message?
Have you taken -std=c99 out of the options? That's not valid for compiling C++
You should not need any -std option.