c++程序编译遇到问题:
In function tensorflow::GPUOptions* google::protobuf::MessageLite::CreateMaybeMessage<tensorflow::GPUOptions>(google::protobuf::Arena*)': tf_utils.cpp:(.text._ZN6google8protobuf11MessageLite18CreateMaybeMessageIN10tensorflow10GPUOptionsEEEPT_PNS0_5ArenaE[_ZN6google8protobuf11MessageLite18CreateMaybeMessageIN10tensorflow10GPUOptionsEEEPT_PNS0_5ArenaE]+0x14): undefined reference to
tensorflow::GPUOptions* google::protobuf::Arena::CreateMaybeMessagetensorflow::GPUOptions(google::protobuf::Arena*)’
解决方法:
程序调用的静态库用的tensorflow和protobuf的版本不对,将对应的静态库的版本换成正确的就可以了。