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