小编shr*_*eya的帖子

我无法使用 g++ 命令编译 C++ 程序

如果我尝试通过以下命令编译我的 C++ 源文件:

g++ a.cpp
Run Code Online (Sandbox Code Playgroud)

它输出:

The program 'g++' can be found in the following packages:
 * g++
 * pentium builder

try:
sudo apt-get intsall <<a>selected package>
Run Code Online (Sandbox Code Playgroud)

但是,如果我运行建议的命令 ( sudo apt-get install g++),它会显示一切都已安装。

那么,基本上,我如何在 Ubuntu 12.04 中编译一个简单的 C++ 程序?

compiling c++ g++ compiler

4
推荐指数
1
解决办法
3997
查看次数

标签 统计

c++ ×1

compiler ×1

compiling ×1

g++ ×1