MinGW c++ compiler zlib1.dll missing error?

一世执手 提交于 2020-01-11 19:57:50

问题


I have just started to learn C++ for school, and I'm trying to download the compiler MinGW to compile my source code. However, every time I try to compile a program an error message shows up saying that zlib1.dll is missing.

This is the error message

the program can't start because zlib1.dll is missing from your computer

I have tried installing/re-installing with no luck. I don't know what's the problem here?

Can anyone please help me with this problem as I have some homework that I need to do but I can't without the compiler.

Thanks.


回答1:


From the MinGW getting started; an automated GUI installer assistant, or use mingw-get, is available (installed as "MinGW Installation Manager") and can be used to install additional libraries and manage dependencies. For the missing zlib libraries, add the mingw32-libz libraries as required.


It seems to have been an issue previously here on super user. It seems you may be able to get them directly from the zlib website. Open Babel has some info on it being required to be copied afterwards (together with some other dlls).


Alternatives include using the mingw-w64 distros from nuwen or mingw-builds. I've never had any issue getting these up and going. They also support x64 builds.




回答2:


I had this same problem, but fixed it like this:

  1. I ran the MinGW Installation Manager (e.g. C:\MinGW\libexec\mingw-get\guimain.exe).
  2. I navigated to All Packages -> MinGW -> MinGW Libraries.
  3. I checked the boxes next to mingw32-libz (dev & dll).

  4. I went to Installation -> Apply Changes.

Now everything worked properly.




回答3:


Had same problem here, I've just used mingw-get install mingw32-libzat the cmd and it worked.



来源:https://stackoverflow.com/questions/25542055/mingw-c-compiler-zlib1-dll-missing-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!