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++'解决

posted @ 2019-12-12 14:06  yushimeng  阅读(2715)  评论(0编辑  收藏  举报