Re: Gcc/g++

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

 



Sampath Kumar Herga wrote:

> Hi,
>
>I am new to this group and had a very basic question. What is the
>difference between gcc and g++ when compiling c++ files. 
>
Short version: Don't use gcc to compile c++ files unless you know what
you are doing :)

>Also if we have
>a mix of c and c++ files in a project, which is the better compiler to
>use?
>
>  
>
If you C files are also valid C++ (which there is a good chance there
will be, espically if they are well written), it would be easiest to
compile them all as C++. If you can't / don't want to do this, you'll
have to use the "extern C" notation to mark any functions called from,
or defined in, a C file.

>Please let me know if this is not the correct mailing-list for this
>question.
>
>  
>
I'm fairly sure it is :)
Chris

[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