Mail Archives: djgpp/1995/12/14/03:37:47
On 12 Dec 1995, Laszlo Vecsey wrote:
> What should I use to compile my C++ programs? gcc works fine for C, should
> I use the same executable for my C++ code? I tried cpp, and gcc, they
> both produce the same results; a problem with streambuf.h in lines 25 and
> 153. I can't seem to get around this problem.
Yes, you should use gcc to compile C++ code as well, and you should name
your file *.cc or *.cpp or *.cxx (check out the FAQ list in faq102.zip
for the list of the extensions). Gcc uses the filename extension to
decide what program (cc1.exe or cc1plus.exe) to invoke to parse the
source file. You can also use the ``-x c++'' switch to gcc to tell it
that's C++ source.
- Raw text -