gpt4 book ai didi

c++ - 无法使用 Fedora 中的 g++

转载 作者:可可西里 更新时间:2023-11-01 17:08:36 26 4
gpt4 key购买 nike

$ yum list | grep gcc
arm-gp2x-linux-gcc.i686 4.1.2-11.fc12 @fedora
arm-gp2x-linux-gcc-c++.i686 4.1.2-11.fc12 @fedora
gcc.i686 4.4.3-4.fc12 @updates
libgcc.i686 4.4.3-4.fc12 @updates
avr-gcc.i686 4.4.2-2.fc12 updates
avr-gcc-c++.i686 4.4.2-2.fc12 updates
compat-gcc-34.i686 3.4.6-18 fedora
compat-gcc-34-c++.i686 3.4.6-18 fedora
compat-gcc-34-g77.i686 3.4.6-18 fedora
compat-libgcc-296.i686 2.96-143 fedora
gcc-c++.i686 4.4.3-4.fc12 updates
gcc-gfortran.i686 4.4.3-4.fc12 updates
gcc-gnat.i686 4.4.3-4.fc12 updates
gcc-java.i686 4.4.3-4.fc12 updates
gcc-objc.i686 4.4.3-4.fc12 updates
gcc-objc++.i686 4.4.3-4.fc12 updates
mingw32-gcc.i686 4.4.1-3.fc12 fedora
mingw32-gcc-c++.i686 4.4.1-3.fc12 fedora
mingw32-gcc-gfortran.i686 4.4.1-3.fc12 fedora
mingw32-gcc-objc.i686 4.4.1-3.fc12 fedora
mingw32-gcc-objc++.i686 4.4.1-3.fc12 fedora
msp430-gcc.i686 3.2.3-3.20090210cvs.fc12
$

gcc 在 .c 文件上工作正常但在 .cpp 文件上失败说:

$ gcc: error trying to exec 'cc1plus': execvp: No such file or directory

g++ 失败说:

$ g++: Command not found.

我应该怎么做才能编译C++文件?

最佳答案

你需要安装gcc-c++包:

yum 安装 gcc-c++

关于c++ - 无法使用 Fedora 中的 g++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2830015/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com