The program can't start because cygwin1.dll is missing… in Eclipse CDT

后端 未结 2 505
猫巷女王i
猫巷女王i 2020-12-24 05:23

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 CD

相关标签:
2条回答
  • 2020-12-24 05:56

    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.

    0 讨论(0)
  • 2020-12-24 06:00

    You can compile with either Cygwin's g++ or MinGW (via stand-alone or using Cygwin package). However, in order to run it, you need to add the Cygwin1.dll (and others) PATH to the system Windows PATH, before any cygwin style paths.

    Thus add: ;C:\cygwin64\bin to the end of your Windows system PATH variable.

    Also, to compile for use in CMD or PowerShell, you may need to use:

    x86_64-w64-mingw32-g++.exe -static -std=c++11 prog_name.cc -o prog_name.exe
    

    (This invokes the cross-compiler, if installed.)

    0 讨论(0)
提交回复
热议问题