- It has an efficient binary serialization algorithm
- It runs cross platforms
- It support mainstream programming languages, c++, python and java. there are also lots of porting out there for other popular languages.
- It's designed to make protocols both backward and forward compatible.
- It enables developers to focus on protocol design.
- Create a Win32 Smart Device Project library project, name it protobuf-lite-ce
- Copy all source files from protobuf-lite project to protobuf-lite-ce project in Solution Explorer
- Create a ce_port folder in the project's directory, and copy the errno.h header file from (Visual_Studio_Root)/VC/include into the folder. This is because Windows CE doesn't have this file, so we need to provide one. Actually, this errno.h can be a pure empty file.
- Add "../src;.;./ce_port" to the project's Additional Include Directories.
- The windef.h header file already defines OPTIONAL macro, it conflicts with Cardinality::OPTIONAL enum. So the extension_set.cc fails to compile, to solve this, add following code before enum Cardinality definition to undefine OPTIONAL:
#if defined(OPTIONAL)
#if defined(_MSC_VER)
#pragma message ("Unexpected OPTIONAL macro definition, #undefine OPTIONAL")
#else
#warning "Unexpected OPTIONAL macro definition, #undefine OPTIONAL"
#endif
#undef OPTIONAL
#endif
namespace {
enum Cardinality {
REPEATED,
OPTIONAL
};
} // namespace
Now the protobuf-lite-ce project should compiles fine.
Here is the project file for downloading. Just get everything there and place them in protobuf/vsprojects/ directory.
No comments:
Post a Comment