g++ cannot be found
g++ cannot be found
我写了一个c++程序,如下所示,
#include <iostream>
using namespace std;
main()
{
int a,b,c;
cout<<"Enter two numbers"<<endl;
cin>>a>>b;
c=a+b;
cout<<"Sum of two numbers are"<<c;
}
并尝试使用以下方法编译程序,
home$ g++ add.cpp
我收到此错误,
程序 g++ 可以在以下软件包中找到,g++,奔腾生成器
有人可以帮助我吗?
您需要
安装 g++
。正如它所建议的那样,它可以在g++
包中找到,您可以使用 apt-get
.像这样:
sudo apt-get install g++
但是,您可能想要安装 build-essential
,这基本上为您提供了许多有用的构建工具:
sudo apt-get install build-essential
在 Ubuntu 的发行版中,默认情况下不安装 g++。要安装它,您应该安装"build-essentials"软件包。您可以使用 GUI 包管理器找到此包,或打开终端并编写:
sudo apt-get install build-essentials
Build-essentials包含许多用于编译,执行和调试本机程序的工具。
相关文章:
- C++核心准则 C35 对于接口类"A base class destructor should be either public and virtual, or protected and nonv
- 使用模板进行堆栈实现; "name followed by :: must be a class or namespace"
- OpenCV Android C++ imwrite not found
- 这对"With a stackless coroutine, only the top-level routine may be suspended."意味着什么
- 为什么我会" void value not ignored as it ought to be"?
- 解决"ld: library not found for -ltensorflow_framework.2.3.0"
- 加载与引用 .NET DLL 位于同一文件夹中的引用的 .NET DLL 时"Not found"异常
- _BitScanForward64 can not be found
- 使用自定义 nodejs 插件时的"The specified module could not be found"
- Boost.Python 和导入 dll,"The specified module could not be found"
- 查找适用于"The specified module could not be found"的 DLL
- g++ cannot be found
- 10 手机:"The specified module could not be found. (Exception from HRESULT: 0x8007007E)" :空
- Microsoft Visual Studio - 'The build tools for v140 cannot be found'
- WP8.1 发布内部版本异常的原因:"System.IO.FileNotFoundException: The specified module could not be found" ?
- -lglut32 cannot be found
- Windows XP 上的"Unable to load DLL ... The specified procedure could not be found" C++
- visual studio 2012 c++ windows.h cannot be found
- 窗口加载菜单错误: "The specified resource name cannot be found in the image file."
- NetUserSetInfo: "User name could not be found"