7 Sep
2017
7 Sep
'17
9:24 p.m.
I guess you are wrong ;) See `man gcc` where the DESCRIPTION states: The usual way to run GCC is to run the executable called gcc, or machine-gcc when cross-compiling, or machine-gcc-version to run a specific version of GCC. When you compile C++ programs, you should invoke GCC as g++ instead. Have a nice evening! Patrick On 07.09.2017 22:41, Arch User via arch-general wrote:
Compiling a sample xxx.cc file using 'c++' command compiles fine whereas 'gcc' command outputs errors. A whole bunch of 'undefined reference to's. Am i wrong to assume that 'gcc' command would use the file extension and call the appropriate compiler.