ndk-build对整个工程编译,报错如下:"Compile++ thumb : hello-jni <= hello-jni.cpp
In file included from D:/CD/workplace/HelloJNI//jni/hello-jni.cpp:18:0:
D:/android-ndk-r8b/platforms/android-3/arch-arm/usr/include/jni.h:592:13: note:
the mangling of 'va_list' has changed in GCC 4.4
StaticLibrary  : libstdc++.a
SharedLibrary  : libhello-jni.so
Install        : libhello-jni.so => libs/armeabi/libhello-jni.so.so文件可以生成,不过android程序执行报错退出。Android.mk 如下:LOCAL_PATH := $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.cppinclude $(BUILD_SHARED_LIBRARY)
这个测试程序并没有引用特定的库,所以可以把cpp改成c,再次编译运行无错。
求助这是怎么回事啊?
D:/android-ndk-r8b/platforms/android-3/arch-arm/usr/include/jni.h:592:13: note:
the mangling of 'va_list' has changed in GCC 4.4

解决方案 »

  1.   

    I think that the warning is accurate; the mangling of va_list has indeed changed on ARM in GCC 4.4 in order to conform to the ARM ABI specifications. There is an option to turn off warnings about PSABI issues; -Wno-psabi.  I think that option (if not some stronger option) should be used.
      

  2.   

    在Application.mk文件里加一句 NDK_TOOLCHAIN_VERSION=4.4.3
      

  3.   

    我加了这个选项了,编译没有任何错误了,不过在执行的时候avd上面的程序会崩掉
      

  4.   

    建议不要用r8b,我也是遇到同样的问题,现在换r8,目前还没报这个问题。