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

前端 未结 14 1061
长情又很酷
长情又很酷 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:18

    if you are using cmake and used pthreads, try add the following lines

    find_package(Threads)
    target_link_libraries(${CMAKE_THREAD_LIBS_INIT})
    

提交回复
热议问题