DSO missing from command line

Posted micoblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DSO missing from command line相关的知识,希望对你有一定的参考价值。

C++ 改成C语言接口时,build遇到错误如下:

/usr/bin/ld: objs/addon/src/KeepAliveNotify.o: undefined reference to symbol ‘_ZNKSs5c_strEv@@GLIBCXX_3.4‘
/usr/local/lib64/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: 错误:ld 返回 1
make[1]: *** [objs/nginx] 错误 1

错误原因:

没有链接libstdc++.so库,导致C++文件无法编译(或链接,自己不太确定),链接库中加入‘-lstdc++‘解决

以上是关于DSO missing from command line的主要内容,如果未能解决你的问题,请参考以下文章