openwrtprotocol-bufferslinker-errorssymbol-not-found

Cannot resolve symbol in libprotobuf in openwrt


I have cross compiled a client server program to be run on openwrt plattform I have used protoc version 2.6.1 to generate the .pb.h and .pb.cc files.

I have installed he protobuf package for cross compilation using the this I have linked the compiled protobuf libraries to the source while compiling.

But when I try to run the executable on the openwrt VM (chaos calmer) it gives me the following error.

symbol '_ZN6google8protobuf8internal13empty_string_B5cxx11E': can't resolve the symbol in lib './opwenwrt-client'

error image

I can guess the that there is mismatch between linking library. But I dont understand that everywhere I am using protobuf version 2.1.6.

Any kind of help would be appreciated.


Solution

  • This looks like it's probably caused by using a different compiler / C++ ABI to compile your application vs. libprotobuf.so. See this previous question for more:

    Undefined reference to google::protobuf::internal::empty_string_[abi:cxx11]