对于两个不同的NDK版本,同一个库有两个不同的NDK构建错误?

时间:2013-10-30 20:24:30

标签: android curl android-ndk cygwin

我有一个构建在c中的ndk库,可以包含在项目中。尝试使用Windows环境变量构建ndk Path = C:\ android \ android-ndk-r8c-windows \ android-ndk-r8c \ 该命令从cygwin bash提示符运行。

直接尝试使用cmd中的ndk-build并发出持久性

收到以下错误

$ ndk-build
/cygdrive/c/android/android-ndk-r8c-windows/android-ndk-r8c/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 7 in /cygdrive/c/REPOS/Androidtrunk/ciLibrary/AndroidManifest.xml
Cygwin         : Generating dependency file converter script
Compile++ thumb  : ciandroid <= CellRecord.cpp
Compile++ thumb  : ciandroid <= ci.cpp 
Compile++ thumb  : ciandroid <= ConnectionRecord.cpp
In file included from C:/REPOS/Androidtrunk/ciLibrary/jni/ciandroid/ConnectionRecord.cpp:8:0:
C:/REPOS/Androidtrunk/ciLibrary/jni/ciandroid/../data_common/ConnectionObserverData.h:23:19: fatal error: Redis.h: No such file or directory
compilation terminated.
/cygdrive/c/android/android-ndk-r8c-windows/android-ndk-r8c/build/core/build-binary.mk:263: recipe for target '/cygdrive/c/REPOS/Androidtrunk/ciLibrary/obj/local/armeabi/objs/ciandroid/ConnectionRecord.o' failed 
make: *** [/cygdrive/c/REPOS/Androidtrunk/ciLibrary/obj/local/armeabi/objs/ciandroid/ConnectionRecord.o] Error 1

注意:当添加了丢失的头文件REDIS.H时,上面的错误已被解决,但是当从LATEST NDK VERSION运行相同的文件时,会出现如下所示的相同错误。

现在更改了windows环境变量Path = C:\ android \ android-ndk-r9-windows-x86_64 \ android-ndk-r9 \,错误是

Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 7 in /cygdrive/c/REPOS/Androidtrunk/ciLibrary/AndroidManifest.xml
Cygwin         : Generating dependency file converter script
Compile++ thumb  : catmgrd <= ActiveTestMgrAndroid.cpp
Compile++ thumb  : catmgrd <= ControlMsg.cpp
Compile++ thumb  : catmgrd <= DNSTObserver.cpp
Compile++ thumb  : catmgrd <= DnsTestDriver.cpp
Compile++ thumb  : catmgrd <= FileMoveActor.cpp
In file included from C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curl.h:35:0,
                 from C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:24:
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:79:4: error: #error "CURL_SIZEOF_LONG definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:94:4: error: #error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:99:4: error: #error "CURL_FORMAT_CURL_OFF_T definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:104:4: error: #error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:109:4: error: #error "CURL_FORMAT_OFF_T definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:114:4: error: #error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:119:4: error: #error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:124:4: error: #error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:80:4: error: 'Error' does not name a type
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:153:6: error: 'curl_off_t' was not declared in this scope
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:153:6: error: 'CURL_SIZEOF_CURL_OFF_T' was not declared in this scope
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curlrules.h:163:6: error: 'curl_off_t' was not declared in this scope
In file included from C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:24:0:
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curl.h:235:3: error: 'curl_off_t' does not name a type
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/../curl/include/curl/curl.h:296:35: error: 'curl_off_t' has not been declared
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp: In function 'int FileTransferRunCurl(FileTransferInfo*, char*, char const*, char const*, char const*)':
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:397:13: error: 'curl_off_t' was not declared in this scope
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp: In function 'char* CreateTempFileName(char*)':
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:915:78: warning: format '%d' expects argument of type 'int', but argument 4 has type 'time_t {aka long int}' [-Wformat]
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:915:78: warning: format '%d' expects argument of type 'int', but argument 5 has type 'suseconds_t {aka long int}' [-Wformat]
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp: In function 'int FileMoveActorRun(FileTransferInfo*)':
C:/REPOS/Androidtrunk/ciLibrary/jni/catmgrd/FileMoveActor.cpp:1083:90: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'long long int' [-Wformat]
/cygdrive/c/android/android-ndk-r9-windows-x86_64/android-ndk-r9/build/core/build-binary.mk:348: recipe for target '/cygdrive/c/REPOS/Androidtrunk/ciLibrary/obj/local/armeabi/objs/catmgrd/FileMoveActor.o' failed
make: *** [/cygdrive/c/REPOS/Androidtrunk/ciLibrary/obj/local/armeabi/objs/catmgrd/FileMoveActor.o] Error 1
-------------------------------------

Android.mk文件有

include $(call all-subdir-makefiles)

使用了android最新的adt插件。

0 个答案:

没有答案