3

I am trying to use Protobuf 2.6 with Xcode version 6.3. I've added the libprotobuf-lite.a to my Demo application and added the path to the Header files in the Header Search Paths., but I am getting this error.

Undefined symbols for architecture i386:
"google::protobuf::io::StringOutputStream::StringOutputStream(std::string*)", referenced from: attributes::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*) in attributes.pb.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Aagman
  • 684
  • 6
  • 18
  • 1
    Could you add some of your code to the question? And maybe the desired output? – evolutionxbox Aug 11 '15 at 10:36
  • I am using proto buf in a big project to just send the ip addresses and port number from one side to another. But after adding those proto buff files (.h and .cc) I am getting the above mentioned compilation error. PS- i have added all the header paths and library properly. – Aagman Aug 13 '15 at 07:45
  • Does the protobuf library include support for CPU Arch i386 (use `file` or `lipo` to find out)? – trojanfoe Aug 14 '15 at 14:03
  • NO i m working for armv7 armv7s – Aagman Aug 14 '15 at 14:08
  • You are linking for i386 (see the error message), so the library needs to have support for it. – trojanfoe Aug 14 '15 at 14:09
  • Yes, I know that. And i cannot change that code. Actually I want some work around for that. changing the code will take life time of my time. Hope you understand that. – Aagman Aug 14 '15 at 14:14
  • @trojanfoe Is there any way ,so that i can do it for i386 ? – Aagman Aug 15 '15 at 05:44
  • I don't understand why you are using protobuf in *library form*. When I've used it in the past I've simply pulled the protobuf source files into the project. Problem solved. – trojanfoe Aug 15 '15 at 09:21
  • @trojanfoe which source files are you talking about ( .pb.h & .pb.cc)? I have dragged them to my project but ti make thrm work i need the libraries and the header files which are present in the "include" folder of Protobuf and for that purpose iam giving the path of those headers and library . – Aagman Aug 16 '15 at 09:28
  • No I'm talking about all the protobuf source files (the ones in the library). – trojanfoe Aug 16 '15 at 11:07
  • @trojanfoe I try doing what you suggested but it did not work out for me. – Aagman Aug 17 '15 at 10:40

0 Answers0