#import <string> on ios? Protobuf C ++ on ios
I am trying to get protobuf in xcode 4 and working with ios 5. I did other lessons that did not work. I used a script to compile libraries into arm 7 architecture, and then added them to my project. This is the only thing that has worked so far.
Now my problem is that I am trying to use the generated C ++ files; however, I get the error #include -> lexical or preprocessor.
Any tips? It only showed it when I tried to run my project on ipad. Everything was fine before.
Thanks.:)
// Created by the protocol buffer compiler. DO NOT CHANGE! // source: address book.proto
#ifndef PROTOBUF_addressbook_2eproto__INCLUDED #define PROTOBUF_addressbook_2eproto__INCLUDED #include <string> #include <google/protobuf/stubs/common.h> //#include "google/protobuf/stubs/common.h" #if GOOGLE_PROTOBUF_VERSION < 2004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 2004001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include <google/protobuf/generated_message_util.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> #include <google/protobuf/generated_message_reflection.h> Update: this only breaks when I include it in obj c file. I can do Demo.h and enable the address book. Why can't I include addressbook.pb.h in my obj c file? Did I miss something? Which one?
No one has answered this question yet.
See similar questions:
or similar: