运行C中编写的程序时,Cygwin1.dll未找到。如何让Windows找到它? [英] Cygwin1.dll 'not found' when running a program written in C. How can I make Windows find it?

查看:202
本文介绍了运行C中编写的程序时,Cygwin1.dll未找到。如何让Windows找到它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图运行我用C编写的第一个hello world prog。我将它编译成eclipse并且没有错误,但是当我尝试运行它时,我得到:

So I'm trying to run my first hello world prog written in C. I compiled it in eclipse and get no errors, but when I try to run it I get:

此应用程序无法启动,因为没有找到cygwin1.dll。

"This application has failed to start because cygwin1.dll was not found."

我发现这篇文章,这似乎表明我应该将其添加到Windows PATH,我使用这个这样做。所以现在我的环境变量中的路径有; C:\cygwin\bin\cygwin1.dll附加到底。还没有工作任何人都知道我可能做错了什么?我的'程序'只是这样:

I found this post which seems to indicate I should add it to Windows PATH, and I used this to do that. So now "Path" in my environment variables has ";C:\cygwin\bin\cygwin1.dll" appended to the end. Still no worky. Anyone have a clue what I might be doing wrong? My 'program' just looks like this:

#include <stdio.h>

main()
{
    printf("hello, world\n");
}


推荐答案

PATH环境变量需要包含包含cygwin1.dll的目录,而不是cygwin1.dll本身的路径。所以只需确保PATH中有一个字符串C:\cygwin\bin

The PATH environment variable needs to include the directory containing cygwin1.dll, not the path to cygwin1.dll itself. So just make sure that PATH has the string "C:\cygwin\bin" in it.

这篇关于运行C中编写的程序时,Cygwin1.dll未找到。如何让Windows找到它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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