对'inflateInit2_'的未定义引用 [英] Undefined reference to '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屋!