对'inflateInit2_'的未定义引用 [英] Undefined reference to 'inflateInit2_'

查看:3582
本文介绍了对'inflateInit2_'的未定义引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Code Blocks IDE,我想为SFML安装Tiled Map Editor。所以,我下载了源代码并将其导入到了我的项目中。不幸的是,由于缺少zlib库,构建完成时出现错误。我下载并重新构建。这次我收到一个错误消息:

 对'inflateInit2_'的未定义引用| 
对`inflateEnd'|的未定义引用
对`inflateEnd'|的未定义引用

在Internet上,我找到了加入链接器命令 -lz ,但编译器拒绝抛出错误:找不到-lz 。有谁知道如何解决它?



问候。

解决方案

使用选项 -L 来告诉编译器在哪里找到 libz.so.xyz

供您参考: http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html


I'm using Code Blocks IDE and I want to install Tiled Map Editor for SFML. So, I downloaded the source and imported it to my project. Unfortunately, the build finished with an error due to missing zlib library. I downloaded it and built again. This time I received an error that reads:

undefined reference to `inflateInit2_'|
undefined reference to `inflateEnd'|
undefined reference to `inflateEnd'|

On the Internet I found the advice to join the linker command -lz, but the compiler refuses throwing the error: cannot find -lz. Does anyone know how to fix it?

Regards.

解决方案

Use the option -L<path> to tell the compiler where to find libz.so.x.y.z.

For your reference: http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

这篇关于对'inflateInit2_'的未定义引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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