libpthread.so.0: error adding symbols: DSO missing from command line

前端 未结 14 1016
长情又很酷
长情又很酷 2020-11-22 07:00

When I\'m compiling openvswitch-1.5.0, I\'ve encountered the following compile error:

 gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith
     -         


        
14条回答
  •  孤独总比滥情好
    2020-11-22 07:12

    The error message depends on distribution / compiler version:

    Ubuntu Saucy:

    /usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
    /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
    

    Ubuntu Raring: (more informative)

    /usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command line
    

    Solution: You may be missing a library in your compilation steps, during the linking stage. In my case, I added '-lz' to makefile / GCC flags.

    Background: DSO is a dynamic shared object or a shared library.

提交回复
热议问题