compiler-errors - 编译错误 - 缺少 zlib.h

标签 compiler-errors compilation zlib

我尝试使用 IBM XL 编译器在 Blue Gene Q 上编译软件,但收到此错误消息:

"iostreams/zlib.cpp", line 19.10: 1540-0836 (S) The #include file "zlib.h" is not found.
make[3]: *** [zlib.o] Error 1

我已经安装了新版本的 zlib 并使用 $HOME/zlib/include 更新了 LD_LIBRARY_PATH

我错过了什么吗?

最佳答案

您缺少 zlib.h 头文件,在 Linux 上通过以下方式安装它:

sudo apt-get install libz-dev

事实上,该模块在 apt 存储库中显示为 zlib1g-dev,因此这是最新的调用(2019 年 2 月):

sudo apt install zlib1g-dev

在 Fedora 上:sudo dnf install zlib-devel(在旧版本中:sudo dnf install libz-devel)。

这将为实现 gzip 和 PKZIP 中的 deflate 压缩方法的库提供开发支持文件。

如果您已经有了 zlib 库,请确保使用 -lz 编译代码源。请参阅:How to fix undefined references to inflate/deflate functions? .

关于compiler-errors - 编译错误 - 缺少 zlib.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18148075/

相关文章:

c# - 为什么一个属性被认为是不明确的,而另一个接口(interface)是只设置的?

c++ - 在静态成员函数中无效使用成员 ‘xx::x’

c++ - 使Eclipse生成C++可执行文件

java - 如何从 Jython 脚本调用 C 函数?

c++ - 压缩库 Windows 运行时

gcc - va_list 尚未声明

java - 用户定义方法java的问题

c++ - 在 Win7 x64 上编译 Qt 应用程序的最简单方法

c# - 在.net core中创建 "shared zlib context"

python - 使用 zipfile zlib python 和 mailgun 时,Mailgun 仅在 Python 脚本中发送部分 zip 文件