今天增加了一個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++。然後再重新編譯,這個錯誤就沒了。
感謝黨感謝國家感謝程式員感謝提示者感謝觀世音菩薩……