Google Protobuf will not build under ARM64

What steps will reproduce the problem?
1. Build Google protobuf code for ARM64 target

What is the expected output? What do you see instead?
I expected it to buid cleanly, instead I hit the "#error Host architecture was not detected as supported by protobuf" preprocessor macro.

What version of the product are you using? On what operating system?
I'm using protobuf-2.5.0 on MacOSX building for iOS 64-bit. 
 
  
 
  
 
  
I have a workaround. It build without error but I DIDN'T TEST IT ON A REAL DEVICE.
Could someone test it and tell us if it's ok ?

In platform_macros.h, Replace
#else
#error Host architecture was not detected as supported by protobuf
#endif

By:
#elif defined(__aarch64__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#else
#error Host architecture was not detected as supported by protobuf
#endif

 
  
I checked on device (iPhone 5s). It works fine with this workaround.

 
  
文章来源:https://code.google.com/p/protobuf/issues/detail?id=575

你可能感兴趣的:(Cocos2D-X)