Trouble Compiling c++ file on Linux platform and eclipse IDE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

I tried all the options given in the gcc manual but without success.

I tried all of the below

-std=
Determine the language standard. This option is currently only supported
when compiling C or C++. A value for this option must be provided; possible
values are
`c89'
`iso9899:1990'
ISO C90 (same as -ansi).
`iso9899:199409'
ISO C90 as modified in amendment 1.
`c99'
`c9x'
`iso9899:1999'
`iso9899:199x'
ISO C99. Note that this standard is not yet fully supported; see
http://gcc.gnu.org/gcc-4.0/c99status.html for more information. The names
`c9x' and `iso9899:199x' are deprecated.
`gnu89'
Default, ISO C90 plus GNU extensions (including some C99 features).
`gnu99'
`gnu9x'
ISO C99 plus GNU extensions. When ISO C99 is fully implemented in GCC, this
will become the default. The name `gnu9x' is deprecated.
`c++98'
The 1998 ISO C++ standard plus amendments.
`gnu++98'


Am i missing something. ?

thanks. 
-- 
View this message in context: http://old.nabble.com/Trouble-Compiling-c%2B%2B-file-on-Linux-platform-and-eclipse-IDE-tp33252593p33252593.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux