解决办法:undefined reference to symbol ‘dlclose@@GLIBC_2.2.5‘

错误如下:

/usr/bin/ld: /usr/local/lib/libavcodec.a(cuviddec.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line

解决办法:

  • 有人说加个-ldl即可.这个某些情况下是对的.
  • 还有一种情况,就是链接库有问题.比如本案例中,吾意思是链接-lavcodec,结果没有libavcodec.so,却有libavcodec.a,于是什么都链接不上.

解决办法:undefined reference to symbol ‘dlclose@@GLIBC_2.2.5’
undefined reference to symbol ‘dlclose@@GLIBC_2.2.5’(Qt 调用静态库从mac换到ubuntu 16.04.10报错)
qt报错undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5’

猜你喜欢

转载自blog.csdn.net/weixin_43798960/article/details/109654687
今日推荐