相关疑难解决方法(0)

编译错误 - 缺少zlib.h

我正在尝试使用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
Run Code Online (Sandbox Code Playgroud)

我已经安装的zlib的新版本和更新的LD_LIBRARY_PATH$HOME/zlib/include

我错过了什么吗?

compiler-errors compilation zlib

60
推荐指数
2
解决办法
9万
查看次数

如何修复对膨胀/收缩函数的未定义引用?

我正在尝试编译示例中提供的现有代码zlib,但它首先给了我错误:

nikhil@nikhil-Vostro-3500:~/zlib-1.2.8/examples$ gcc -o zpipe -g zpipe.c 
/tmp/ccVZzqsb.o: In function `def':
/home/nikhil/zlib-1.2.8/examples/zpipe.c:32: undefined reference to `deflateInit_'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:40: undefined reference to `deflateEnd'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:51: undefined reference to `deflate'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:55: undefined reference to `deflateEnd'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:66: undefined reference to `deflateEnd'
/tmp/ccVZzqsb.o: In function `inf':
/home/nikhil/zlib-1.2.8/examples/zpipe.c:90: undefined reference to `inflateInit_'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:98: undefined reference to `inflateEnd'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:109: undefined reference to `inflate'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:116: undefined reference to `inflateEnd'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:121: undefined reference to `inflateEnd'
/home/nikhil/zlib-1.2.8/examples/zpipe.c:130: undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
nikhil@nikhil-Vostro-3500:~/zlib-1.2.8/examples$ …
Run Code Online (Sandbox Code Playgroud)

c ubuntu gcc compilation zlib

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

compilation ×2

zlib ×2

c ×1

compiler-errors ×1

gcc ×1

ubuntu ×1