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
文章详细介绍了在使用protobuf-2.5.0版本于MacOSX构建iOS64-bit项目时遇到的#errorHostarchitecturewasnotdetectedassupportedbyprotobuf错误,并提供了一个工作修复方案。通过在platform_macros.h文件中修改宏定义,解决了问题并在iPhone5s设备上验证了修复方案的有效性。
1万+

被折叠的 条评论
为什么被折叠?



