开发者

uncompress from zlib.h - error - undefined reference to `uncompress_gzip'

I have code in which, I have got compressed data and I need to uncompress it. I am using zlib for this I have done:

#include <开发者_Go百科;zlib.h>

in my .cpp file. Now, when I compile it, I get the error: undefined reference to `uncompress_gzip'

Do, I need to link with some lib?

Thanks, sg


You need to link it to zlib. Without knowing what compiler you are using, I'll just use GCC:

gcc my.cpp -lz
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜