I am running ubuntu 16.04 with gcc.
My q.ccp
file is
#include <my_messages.pb.h>
int main(int argc, char **argv)
{
google::protobuf::MyMessage* logged_msg_;
return 0;
}
command used for compilation:
g++ -m64 -Wl,-O1 -L/usr/lib/x86_64-linux-gnu /usr/local/lib/libprotobuf.a my_messages.pb.cc q.cpp -lpthread
protoc --version
returns: 2.2.0
gcc --version
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
compile error starts with
undefined reference to `google::protobuf::internal::ExtensionSet::Clear()
and gives undefined reference error for every function of protocol buffers.