日食 - C ++ Hello World项目的错误 [英] Eclipse - C++ hello world project's error

查看:163
本文介绍了日食 - C ++ Hello World项目的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是64位的Winodws 7,我下载了一个 CDT 的Eclipse 和下载的MinGW 。在那之后,我创建了一个C ++的Hello World项目。
这是code:

I am using a 64-bit Winodws 7. I've downloaded a CDT Eclipse and have downloaded MinGW. After that, I created a c++ hello world project. This is the code:

#include <iostream>
using namespace std;

int main() {
    cout << "!!!Hello World!!!" << endl; // This is supposed to print "Hello World!!!"
    return 0;
}

但是当我要运行它,这个错误弹出:
发射失败。二进制没有找到

任何帮助将是非常欢迎的。

Any help would be highly welcomed.

推荐答案

您必须建立项目之前,你可以在运行吧。
当使用Eclipse的Java,您只需点击运行图标,然后Eclipse会全自动编译你的程序,然后运行它。
使用C ++然而,这是出于什么原因并非如此。而不是仅仅单击运行图标,则需要先点击生成图标。这是Eclipse会创建一个makefile文件和编译程序。然后,您可以通过点击运行图标来运行它。

You have to "Build" your project before you can "Run" it. When using Eclipse for Java, you simply click the "Run" icon, then Eclipse will automaticly compile your program and then run it. With C++ however, this is for whatever reason not the case. Instead of just clicking the "Run" icon, you need to click the "Build" icon first. This is where Eclipse will create a makefile and compile your program. Then you can run it by clicking the "Run" icon.

我希望这能解决你的问题。

I hope this solves your problem.

这篇关于日食 - C ++ Hello World项目的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆