如何使用eclipse构建C ++应用程序 [英] How to use eclipse to build C++ applications
问题描述
我已经从 here 。我正在尝试构建一个简单的hello世界程序(大多只是为了测试使用eclipse的C ++),但是我无法得到它来构建和运行。这是我的代码:
I have downloaded Eclipse Juno for C++ from here. I am trying to build a simple hello world program (mostly just to test out using eclipse for C++), but I can't get it to build and run. Here's my code:
#include <iostream>
using namespace std;
int main() {
cout << "hello" << endl;
return 0;
}
问题标签显示
make: *** No rule to make target `all'.
我只能假设这是因为eclipse未配置为找到我的编译器( g ++
for archlinux),但是我不知道如何解决它。理想情况下,我希望能够像Eclipse一样轻松地使用Eclipse编写C ++(即编写代码,构建和运行)。
I can only assume this is happening because eclipse is not configured to find my compiler (g++
for archlinux), but I can't figure out how to fix it. Ideally I want to be able to program in C++ with Eclipse as easily as you can in Java (i.e. write code, build and run).
推荐答案
按照这个:
创建新的c ++项目。
比项目类型选择Executable - > Hello world。
follow this: create new c++ project. Than in project type chose Executable - > Hello world.
这篇关于如何使用eclipse构建C ++应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!