程序无法启动,因为cygwin1.dll在Eclipse CDT中缺少... [英] The program can't start because cygwin1.dll is missing... in Eclipse CDT

查看:177
本文介绍了程序无法启动,因为cygwin1.dll在Eclipse CDT中缺少...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的电脑上使用了Java for Java几年,并决定安装CDT并学习C.我安装了MinGW和Cygwin,并且CDT在我创建一个新项目时检测并尝试使用它们。我选择File> New C ++ Project并选择Hello World C ++ Project和CygwinGCC工具链。我将项目命名为asdf,并在工具栏中点击构建调试。编译器完成没有错误。我打了Run,没有任何反应。手动浏览到项目目录并运行asdf.exe给我一个错误,说程序无法启动,因为cygwin1.dll从您的计算机中丢失,请尝试重新安装该程序来解决此问题。同样的事情发生在使用MinGW,只有一个不同的DLL丢失。我需要做些什么才能使用可用的.exe?我正在运行Windows 7 x64和最新版本的Eclipse和CDT。



编辑:
编译器输出如下:

  ****构建配置项目调试asdf **** 

使所有
构建文件:../src/asdf.cpp
调用:Cygwin C ++编译器
g ++ -O0 -g3 -Wall -c -fmessage-length = 0 -MMD -MP -MFsrc / asdf.d -MTsrc / asdf.d-osrc / asdf.o../src/asdf.cpp
cygwin警告:
检测到MS-DOS样式路径:C:\ Users \Shawn\Dropbox\eclipse\asdf\Debug
首选的POSIX等价物是:/ cygdrive / c / Users / Shawn / Dropbox / eclipse / asdf / Debug
CYGWIN环境变量选项 nodosfilewarning关闭此警告。
有关POSIX路径的详细信息,请参阅用户指南:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
完成建筑:../ src / asdf.cpp

构建目标:asdf.exe
调用:Cygwin C ++链接器
g ++ -oasdf.exe./src/asdf.o
完成建筑目标:asdf.exe


解决方案

此错误消息意味着Windows无法找到cygwin1.dll。 Cygwin gcc创建的程序取决于此DLL。该文件是cygwin的一部分,所以很可能它位于C:\cygwin\bin。要解决这个问题,你需要做的是将C:\cygwin\bin(或者可以找到cygwin1.dll的位置)添加到你的系统路径。或者,您可以将cygwin1.dll复制到Windows目录中。



有一个很好的工具叫做依赖性Walker ,您可以从 http://www.dependencywalker.com 。您可以使用它来检查可执行文件的依赖性,因此,如果您检查生成的程序,它会告诉您哪些依赖关系丢失,哪些被解决。


I've had Eclipse for Java on my computer for a few years, and decided to install the CDT and learn C. I installed both MinGW and Cygwin and the CDT detects and tries to use them when I make a new project. I choose File>New C++ Project and choose Hello World C++ Project and the CygwinGCC toolchain. I name the project "asdf" and hit "Build Debug" in the toolbar. The compiler completes without error. I hit Run and nothing happens. Browsing to the project directory manually and running asdf.exe gives me an error saying "The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem." The same thing happens using MinGW, only a different dll is missing. What do I need to do to have a usable .exe? I'm running Windows 7 x64 and the newest version of Eclipse and the CDT.

EDIT: The compiler output is as follows:

**** Build of configuration Debug for project asdf ****

make all 
Building file: ../src/asdf.cpp
Invoking: Cygwin C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/asdf.d" -MT"src/asdf.d" -o"src/asdf.o" "../src/asdf.cpp"
cygwin warning:
  MS-DOS style path detected: C:\Users\Shawn\Dropbox\eclipse\asdf\Debug
  Preferred POSIX equivalent is: /cygdrive/c/Users/Shawn/Dropbox/eclipse/asdf/Debug
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building: ../src/asdf.cpp

Building target: asdf.exe
Invoking: Cygwin C++ Linker
g++  -o"asdf.exe"  ./src/asdf.o   
Finished building target: asdf.exe

解决方案

This error message means that Windows isn't able to find "cygwin1.dll". The Programs that the Cygwin gcc create depend on this DLL. The file is part of cygwin , so most likely it's located in C:\cygwin\bin. To fix the problem all you have to do is add C:\cygwin\bin (or the location where cygwin1.dll can be found) to your system path. Alternatively you can copy cygwin1.dll into your Windows directory.

There is a nice tool called DependencyWalker that you can download from http://www.dependencywalker.com . You can use it to check dependencies of executables, so if you inspect your generated program it tells you which dependencies are missing and which are resolved.

这篇关于程序无法启动,因为cygwin1.dll在Eclipse CDT中缺少...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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