今天增加了一个cv2功能,编译后出现如下错误:

/usr/bin/ld: gh_main.o: undefined reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:56: recipe for target 'gh_manager' failed

  这有点傻眼,这是什么错误?链接库吾亦加上了。怎么办?

  上网一搜索,看到说法:需要用C++编译器编译你的接口模块。什么意思?

  打开相关的so下的build.sh(每个产生so目录下,吾都写了个build.sh),把gcc改成g++。然后再重新编译,这个错误就没了。

  感谢党感谢国家感谢程序员感谢提示者感谢观世音菩萨……