程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> gcc vs g++

gcc vs g++

編輯:C++入門知識


[root@localhost var]# rpm -qpR gcc-4.4.7-3.el6.x86_64.rpm
warning: gcc-4.4.7-3.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
/bin/sh
/bin/sh
/bin/sh
/sbin/install-info
/sbin/install-info
binutils >= 2.19.51.0.14-33
cloog-ppl >= 0.15
cpp = 4.4.7-3.el6
glibc-devel >= 2.2.90-12
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libgcc >= 4.4.7-3.el6
libgcc_s.so.1()(64bit)
libgomp = 4.4.7-3.el6
libgomp.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1

sh-4.1# rpm -qpR gcc-c++-4.4.7-3.el6.x86_64.rpm
warning: gcc-c++-4.4.7-3.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
gcc = 4.4.7-3.el6
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgmp.so.3()(64bit)
libmpfr.so.1()(64bit)
libstdc++ = 4.4.7-3.el6
libstdc++-devel = 4.4.7-3.el6
libstdc++.so.6()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1


sh-4.1# rpm -ql gcc-c++-4.4.7-3.el6.x86_64|grep 'cc1plus'
/usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1plus

如果直接用GCC編譯C++程序的話,會拋出錯誤:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
說明雖然即使可以使用gcc編譯c++,也需要裝c++庫

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved