MinGW c++编译器zlib1.dll丢失错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25542055/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 11:21:03  来源:igfitidea点击:

MinGW c++ compiler zlib1.dll missing error?

c++compilationmingw

提问by GamefanA

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.dllis missing.

我刚刚开始为学校学习 C++,我正在尝试下载编译器 MinGW 来编译我的源代码。但是,每次我尝试编译程序时都会出现一条错误消息,指出zlib1.dll缺少该消息。

This is the error message

这是错误信息

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

程序无法启动,因为您的计算机中缺少 zlib1.dll

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.

谢谢。

采纳答案by Niall

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.

MinGW 开始;自动 GUI 安装程序助手或使用mingw-get可用(安装为“MinGW 安装管理器”),可用于安装其他库和管理依赖项。对于缺少的 zlib 库,根据需要添加 mingw32-libz 库。



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 Babelhas some info on it being required to be copied afterwards (together with some other dlls).

以前在超级用户上似乎是一个问题。看来您可以直接从zlib 网站获取它们。Open Babel有一些关于它的信息,需要在之后复制(连同其他一些 dll)。



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

替代方案包括使用来自nuwenmingw-buildsmingw-w64 发行版。我从来没有遇到过任何问题。它们还支持 x64 构建。

回答by Doug

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).

    Screenshot

  4. I went to Installation -> Apply Changes.

  1. 我跑了MinGW Installation Manager(例如C:\MinGW\libexec\mingw-get\guimain.exe)。
  2. 我导航到All Packages -> MinGW -> MinGW Libraries.
  3. 我选中了mingw32-libz( dev& dll)旁边的框。

    截屏

  4. 我去了Installation -> Apply Changes

Now everything worked properly.

现在一切正常。

回答by Gabriel Candido

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

这里有同样的问题,我刚刚mingw-get install mingw32-libz在 cmd 上使用过,它工作正常。