C语言 如何在 Eclipse IDE 中运行简单的 C 程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3984457/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 06:45:36  来源:igfitidea点击:

How to run a Simple C Program in Eclipse IDE

ceclipsewindows-7

提问by Thomas Anderson

I've downloaded Eclipse C/C++ IDE . I need to run a simple c program in this(To print welcome).

我已经下载了 Eclipse C/C++ IDE 。我需要在此运行一个简单的 c 程序(打印欢迎)。

While trying to run the program its popping up an error message like "Launch failed: Binary not found" .

在尝试运行该程序时,它会弹出一条错误消息,例如 "Launch failed: Binary not found" .

Need i install any compiler package. ?

需要我安装任何编译器包。?

Please help me to do this.

请帮我做这件事。

采纳答案by Corey

Yes, you have to install a compiler, Eclipse is only an IDE. You can get MinGW here.

是的,你必须安装一个编译器,Eclipse 只是一个 IDE。您可以在此处获取 MinGW 。

回答by Anil Vishnoi

http://www.eclipse.org/cdt/

http://www.eclipse.org/cdt/

Look at the above link,you will get more idea,on how to do development using C/C++ using eclipse.

看看上面的链接,你会得到更多的想法,关于如何使用 Eclipse 使用 C/C++ 进行开发。

回答by Bhanupratap Singh

You can make use of the documentation which comes along with the IDE.

您可以使用 IDE 随附的文档。

Just on the start up window in Eclipse click Tutorials and then click on c/c++ development link and then read Before you Beginpart.

就在 Eclipse 的启动窗口上单击教程,然后单击 c/c++ 开发链接,然后阅读开始之前部分。

Eclipse Help Guide

Eclipse 帮助指南

回答by naikvikrant92

The program you write must be converted into respective binary which is to be run on that particular architecture.This process is carried out by the compiler as a result compiler is required for eclipse IDE to compile and link the code .

您编写的程序必须转换为相应的二进制文件,该二进制文件将在该特定架构上运行。此过程由编译器执行,因此 Eclipse IDE 需要编译器来编译和链接代码。

Various compilers are available such as Microsoft Visual C++ MinGW GCC or Cygwin GCC in the form of chaintools in eclipse so as to compile the code.

Eclipse中以chaintools的形式提供了各种编译器,例如Microsoft Visual C++ MinGW GCC或Cygwin GCC,以编译代码。

回答by Bhanupratap Singh

Eclipse is an IDE.It will help you write applications in c/++,but it will not compile your program as Eclipse does not comes with a compiler pre-configured.

Eclipse 是一个 IDE。它会帮助你用 c/++ 编写应用程序,但它不会编译你的程序,因为 Eclipse 没有预配置的编译器。

You need to install a compiler to run your application.

您需要安装编译器才能运行您的应用程序。

Eclipse is capable to use many c/c++ compilers,some are:

Eclipse 能够使用许多 c/c++ 编译器,其中一些是:

1.Cygwin

1.Cygwin

2.MingW

2.明伟

3.Gross

3.毛

4.Microsoft Visual C++

4.微软Visual C++

List of c/c++ compilers which can be used in Eclipse

可在 Eclipse 中使用的 c/c++ 编译器列表

I would advise to install mingW OR Cygwin.

我建议安装 mingW 或 Cygwin。

If you need more help on running a c/c++ application in Eclipse visit http://www.ibm.com/developerworks/opensource/library/os-ecc/?S_TACT=105AGX44&S_CMP=ART

如果您需要有关在 Eclipse 中运行 ac/c++ 应用程序的更多帮助,请访问 http://www.ibm.com/developerworks/opensource/library/os-ecc/?S_TACT=105AGX44&S_CMP=ART