OpenCV: 对“google::protobuf::internal::Release_CompareAndSwap”的未定义

解决办法:

需要在文件 protobuf/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h 中的以下补丁 

inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
                                       Atomic64 old_value,
                                       Atomic64 new_value) {
   __atomic_compare_exchange_n(ptr, &old_value, new_value, false,
                              __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
   return old_value;

原文:undefined reference to `google::protobuf::internal::Release_CompareAndSwap · Issue #3937 · protocolbuffers/protobuf · GitHub 

猜你喜欢

转载自blog.csdn.net/qq_53144843/article/details/132177063