ndk-build出错详情:
djy@djy:~/mProj/gst-sdk-tutorials/gst-sdk/tutorials/android-tutorial-3$ ndk-build
Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
GStreamer : [GEN] => gst-build/gstreamer_android.c
GStreamer : [COMPILE] => gst-build/gstreamer_android.c
GStreamer : [LINK] => gst-build/libgstreamer_android.so
[armeabi] Prebuilt : libgstreamer_android.so <= gst-build/
[armeabi] Install : libgstreamer_android.so => libs/armeabi/libgstreamer_android.so
[armeabi] Compile thumb : tutorial-3 <= tutorial-3.c
In file included from /home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:20:0,
from jni/tutorial-3.c:4:
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/rect.h:29:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/rect.h:30:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/rect.h:31:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/rect.h:32:5: error: unknown type name 'int32_t'
In file included from jni/tutorial-3.c:4:0:
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:40:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:43:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:47:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:50:5: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:56:5: error: unknown type name 'uint32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:74:1: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:80:1: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:86:1: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:102:1: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:103:9: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:103:24: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:103:40: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:113:1: error: unknown type name 'int32_t'
/home/djy/AndroidTools/android-ndk-r9b/platforms/android-15/arch-arm/usr/include/android/native_window.h:120:1: error: unknown type name 'int32_t'
jni/tutorial-3.c: In function 'gst_native_surface_init':
jni/tutorial-3.c:283:7: warning: too many arguments for format [-Wformat-extra-args]
make: *** [obj/local/armeabi/objs/tutorial-3/tutorial-3.o] Error 1
这个不知道是不是NDK的问题,这里提供一个规避的办法,添加一个tutorial-3.h头文件:
/*This is add by djy on 20131213*/
#ifndef TUTORIAL-3_H
#define TUTORIAL-3_H
typedef signed int int32_t;
typedef unsigned int uint32_t;
#endif //TUTORIAL-3_H