gcc and g++

gcc and g++

1. man g++ / man gcc

gcc - GNU project C and C++ compiler

yongqiang@deepnorth-amax:~$ man g++
yongqiang@deepnorth-amax:~$ man gcc

g++ accepts mostly the same options as gcc.

2. which gcc / which g++

yongqiang@deepnorth-amax:~$ which gcc
/usr/bin/gcc
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ which g++
/usr/bin/g++
yongqiang@deepnorth-amax:~$

3. ll /usr/bin/gcc* / ll /usr/bin/g++*

yongqiang@deepnorth-amax:~$ ll /usr/bin/gcc
lrwxrwxrwx 1 root root 5 7月   8  2019 /usr/bin/gcc -> gcc-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/g++
lrwxrwxrwx 1 root root 5 7月   8  2019 /usr/bin/g++ -> g++-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/gcc*
lrwxrwxrwx 1 root root      5 7月   8  2019 /usr/bin/gcc -> gcc-5*
-rwxr-xr-x 1 root root 915736 8月  28  2018 /usr/bin/gcc-5*
lrwxrwxrwx 1 root root      8 7月   8  2019 /usr/bin/gcc-ar -> gcc-ar-5*
-rwxr-xr-x 1 root root  31136 8月  28  2018 /usr/bin/gcc-ar-5*
lrwxrwxrwx 1 root root      8 7月   8  2019 /usr/bin/gcc-nm -> gcc-nm-5*
-rwxr-xr-x 1 root root  31136 8月  28  2018 /usr/bin/gcc-nm-5*
lrwxrwxrwx 1 root root     12 7月   8  2019 /usr/bin/gcc-ranlib -> gcc-ranlib-5*
-rwxr-xr-x 1 root root  31136 8月  28  2018 /usr/bin/gcc-ranlib-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/g++*
lrwxrwxrwx 1 root root      5 7月   8  2019 /usr/bin/g++ -> g++-5*
-rwxr-xr-x 1 root root 919832 8月  28  2018 /usr/bin/g++-5*
yongqiang@deepnorth-amax:~$

4. gcc --version / g++ --version

--version
Display the version number and copyrights of the invoked GCC.

yongqiang@deepnorth-amax:~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

yongqiang@deepnorth-amax:~$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值