首页 / 操作系统 / Linux / 利用Ubuntu编译C++程序
在Ubuntu终端输入sudo apt-get install build-esstial
sudo apt-get install g++ gdb
然后到:
http://www.codelite.org下载IDE。(可省)安装好相关package接在在vim下编辑hello.cpp文件,保存退出。#include <iostream>using namespace std;int main(){cout << "Hello,C++!";return 0;}再在终端执行sudo g++ hello.cpp -o hello再在终端敲入 ./hello即可看到运行结果 Hello,C++!