概述
环境:
protocol buffer: 2.5.0
ndk: android-ndk-r13b
ant: apache-ant-1.9.4
cocos2d-x: 3.12
os: mac 10.12
但是最近我必须将arm64-v8a添加到APP_ABI中,并且开始出现以下错误:
stubs/once.h:125: undefined reference to
google::protobuf::internal::Acquire_Load(long const volatile*)
然后我检查,发现Acquire_Load在声明stubs/atomicops.h了宏:
#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
// ......
Atomic64 Acquire_Load(volatile const Atomic64* ptr);
// ......
#endif // GOOGLE_PROTOBUF_ARCH_64_BIT
并在stubs/platform_macros.h定义了GOOGLE_PROTOBUF_ARCH_64_BIT宏:
#if defined(_M_X64) || defined(__x86_64__)
#define GOOGLE_PROTOBUF_ARCH_X64 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#elif defined(_M_IX86) || defined(__i386__)
#define GOOGLE_PROTOBUF_ARCH_IA32 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__QNX__)
#define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__ARMEL__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__MIPSEL__)
#define GOOGLE_PROTOBUF_ARCH_MIPS 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__pnacl__)
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__ppc__)
#define GOOGLE_PROTOBUF_ARCH_PPC 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#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
我对编译东西不是很熟悉,所以无法弄清楚哪里出了问题。
任何建议将不胜感激,谢谢:)
最后
以上就是慈祥茉莉为你收集整理的android 32位 v8编译错误,makefile - android使用arm64-v8a ABI编译错误“未定义引用” - 堆栈内存溢出...的全部内容,希望文章能够帮你解决android 32位 v8编译错误,makefile - android使用arm64-v8a ABI编译错误“未定义引用” - 堆栈内存溢出...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复