gpt4 book ai didi

C程序: Binary not found message and project folder empty although i build my project

转载 作者:太空宇宙 更新时间:2023-11-04 04:40:06 26 4
gpt4 key购买 nike

我尝试创建 simplw Hello World C程序。我安装 GCC位于 C:\MinGW 下并下载Eclipse .我开始Eclipse , File --> New ---> C Project :

Project name选择HelloWorld .

Project type选择Hello World ANSI C Project

Toolchains我有 3 个选项:Cross GCC , Microsoft Visual C++ AMD MinGw GCC所以我选择MinGw GCC .然后点击 Finish .

现在这是生成的代码:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
puts("!!!Hello World!!!");
return EXIT_SUCCESS;
}

#include <stdio.h>#include <stdlib.h>我有红线,上面写着 Unresolved inclusion: <stdio.h>Unresolved inclusion: <stdlib.h>

所以在我的项目下Properties --> C\C++ General --> Paths and symbolsIncludes选项卡我有 2 种语言:AssemblyGNU C .所以我选择GNU C然后在右侧单击 Add按钮并在路径下的目录下 C:\MinGW\include .现在所有的红线都消失了。所以现在我尝试运行我的项目,所以首先我在 Project 下构建它--> Build all并在 Console 中查看Eclipse 按钮中的面板Build Finished 的消息当我尝试运行我的项目并单击“运行”按钮时,我收到错误 Launch failed: Binary not found我可以看到在 Debug 文件夹中我的项目文件夹中我只有 src文件夹是空的,仅此而已。我做错了什么?

最佳答案

您可能忘记将 MingW 目录添加到您的 Windows 系统路径变量中。C:\MinGW\bin;C:\MinGW\msys\1.0\bin;

关于C程序: Binary not found message and project folder empty although i build my project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27291408/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com