Google protocol buffer compiling error in cygwin -


i installed protobuf on cygwin , did test (make check). tests successful. when try compile example file, error.

/tmp/ccffz4qk.o:add_person.cc:(.rdata$.refptr._zn6google8protobuf8internal13empty_string_e[.refptr._zn6google8protobuf8internal13empty_string_e]+0x0): undefined reference `google::protobuf::internal::empty_string_' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0xee3): undefined reference `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0xee3): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x1060): undefined reference `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x1060): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x22f7): undefined reference `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x22f7): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x2385): undefined reference `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x2385): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::internal::wireformatlite::writestringmaybealiased(int, std::string const&, google::protobuf::io::codedoutputstream*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x253d): undefined reference `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x253d): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x2739): undefined reference `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text+0x2739): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::io::codedoutputstream::writestringwithsizetoarray(std::string const&, unsigned char*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text$_zn6google8protobuf8internal10wireformat26verifyutf8stringnamedfieldepkcins2_9operationes4_[_zn6google8protobuf8internal10wireformat26verifyutf8stringnamedfieldepkcins2_9operationes4_]+0x2e): undefined reference `google::protobuf::internal::wireformat::verifyutf8stringfallback(char const*, int, google::protobuf::internal::wireformat::operation, char const*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.text$_zn6google8protobuf8internal10wireformat26verifyutf8stringnamedfieldepkcins2_9operationes4_[_zn6google8protobuf8internal10wireformat26verifyutf8stringnamedfieldepkcins2_9operationes4_]+0x2e): relocation truncated fit: r_x86_64_pc32 against undefined symbol `google::protobuf::internal::wireformat::verifyutf8stringfallback(char const*, int, google::protobuf::internal::wireformat::operation, char const*)' /tmp/ccjplpok.o:addressbook.pb.cc:(.rdata$.refptr._zn6google8protobuf8internal23empty_string_once_init_e[.refptr._zn6google8protobuf8internal23empty_string_once_init_e]+0x0): undefined reference `google::protobuf::internal::empty_string_once_init_' /tmp/ccjplpok.o:addressbook.pb.cc:(.rdata$.refptr._zn6google8protobuf8internal15initemptystringev[.refptr._zn6google8protobuf8internal15initemptystringev]+0x0): undefined reference `google::protobuf::internal::initemptystring()' 

please, me!

you aren't linking against protobuf library. need pass -lprotobuf compiler. (you should make install first, if haven't already.)


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -