Difference between g++ and c++?

Germán A. Racca german.racca at gmail.com
Wed Jan 27 11:18:17 UTC 2010


On Wed, 2010-01-27 at 12:07 +0100, Joachim Backes wrote:
> Hi,
> 
> In F12, I installed gcc-c++, containing /usr/bin/g++ and /usr/bin/c++: 
> comparing both, getting the result: these files are identical. Why then 
> c++ is not a link to g++? Are there important philosophical or 
> historical reasons?
> 
> ls -l /usr/bin/c++ /usr/bin/g++
> -rwxr-xr-x 4 root root 235972 2009-12-22 13:57 /usr/bin/c++
> -rwxr-xr-x 4 root root 235972 2009-12-22 13:57 /usr/bin/g++
> 
> diff /usr/bin/c++ /usr/bin/g++ && echo files are identical
> files are identical
> 
> Regards
They are links to the same file.

$ file /usr/lib64/ccache/g++
/usr/lib64/ccache/g++: symbolic link to `../../bin/ccache'

$ file /usr/lib64/ccache/c++
/usr/lib64/ccache/c++: symbolic link to `../../bin/ccache'

-- 
Germán A. Racca
National Institute for Space Research (INPE)
São José dos Campos - SP - Brasil
http://sites.google.com/site/gracca
http://gracca.wordpress.com



More information about the users mailing list