About linking error in zlib on ubuntu

Recently I need to use zlib in programming on Ubuntu and here I have a problem. I wrote a small program to test zlib functions and I built it in Eclipse. I found it can be compiled but there were some linking errors like this: main.cpp:27: undefined reference to `compress' main.cpp:38: undefined reference to `uncompress' What should I do with this? If this is because there is no library file? Can anyone give some help? Thanks a lot! MOODY_Y Plus, here are my building info: 11:59:08 **** Build of configuration Debug for project test_zlib **** make all Building file: ../main.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp" Finished building: ../main.cpp Building target: test_zlib Invoking: GCC C++ Linker g++ -o "test_zlib" ./main.o ./main.o: In function `main': /home/hyq/workspace/test_zlib/Debug/../main.cpp:27: undefined reference to `compress' /home/hyq/workspace/test_zlib/Debug/../main.cpp:38: undefined reference to `uncompress' collect2: ld return 1 make: *** [test_zlib] error 1 11:59:10 Build Finished (took 1s.715ms)
Show your linker command.

以上就是About linking error in zlib on ubuntu的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏