【发布时间】:2012-01-16 06:44:54
【问题描述】:
当尝试使用 Android NDK 编译带有 Boost c++ 库的程序时,我收到以下类型的错误:
In file included from /home/afeder/android/0ad/jni/lib/boost/boost/assert.hpp:50,
from /home/afeder/android/0ad/jni/lib/boost/boost/random/linear_congruential.hpp:21,
from /home/afeder/android/0ad/jni/src/source/scriptinterface/ScriptInterface.h:34,
from /home/afeder/android/0ad/jni/src/source/ps/World.h:28,
from /home/afeder/android/0ad/jni/src/source/main.cpp:58:
/home/afeder/android/android-ndk-r7/platforms/android-5/arch-arm/usr/include/assert.h: At global scope:
/home/afeder/android/android-ndk-r7/platforms/android-5/arch-arm/usr/include/assert.h:63: warning: redundant redeclaration of 'void __assert(const char*, int, const char*)' in same scope
/home/afeder/android/android-ndk-r7/platforms/android-5/arch-arm/usr/include/assert.h:63: warning: previous declaration of 'void __assert(const char*, int, const char*)'
/home/afeder/android/android-ndk-r7/platforms/android-5/arch-arm/usr/include/assert.h:64: warning: redundant redeclaration of 'void __assert2(const char*, int, const char*, const char*)' in same scope
/home/afeder/android/android-ndk-r7/platforms/android-5/arch-arm/usr/include/assert.h:64: warning: previous declaration of 'void __assert2(const char*, int, const char*, const char*)'
显然,Boost 提供的一组“断言”函数与 NDK 本身提供的一组“断言”函数之间存在某种冲突,但我该如何解决呢?
谢谢。
【问题讨论】:
标签: android c++ linux boost android-ndk