我想在ARM平台上使用Android ADB工具。构建脚本中的一个命令是:
arm-eabi-g++
-I build/libs/host/include/host
-I build/libs/host/include
-I build/libs/host
-I out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates
-I dalvik/libnativehelper/include/nativehelper
-I system/core/include
-I hardware/libhardware/include
-I hardware/libhardware_legacy/include
-I hardware/ril/include
-I dalvik/libnativehelper/include
-I frameworks/base/include
-I frameworks/base/opengl/include
-I frameworks/base/native/include
-I external/skia/include
-I tools/include
-I out/host/linux-arm/obj/include
-I prebuilt/ndk/android-ndk-r5b/platforms/android-9/arch-arm/usr/include
-c -fno-exceptions -Wno-multichar -fPIC
-include system/core/include/arch/linux-arm/AndroidConfig.h
-D_FORTIFY_SOURCE=0
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -DNDEBUG -UDEBUG
-MD -o out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o
build/libs/host/pseudolocalize.cpp
我确保安装了最新的ndk-r5b,这应该可以解决STL问题。但是,我仍然收到以下错误:
In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:4:18: error: string: No such file or directory
In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:6: error: 'string' in namespace 'std' does not name a type
build/libs/host/pseudolocalize.cpp: In function 'const char* pseudolocalize_char(char)':
build/libs/host/pseudolocalize.cpp:61: error: 'NULL' was not declared in this scope
build/libs/host/pseudolocalize.cpp: At global scope:
build/libs/host/pseudolocalize.cpp:71: error: 'string' does not name a type
有谁知道如何解决这个问题?顺便说一句,通过以下链接构建英特尔版本的adb可以正常工作:
http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html
答案 0 :(得分:6)
pseudolocalize.cpp。 NDK工具链旨在用仿生(Android libc)构建。 adb需要glibc(GNU libc)来构建。
我创建了一个Makefile来为Linux / ARM编译adb。这个Makefile为Linux / ARM提供静态链接的adb可执行二进制文件,因此它也适用于Android / ARM。
如何制作。
答案 1 :(得分:1)
如果您需要为ARM构建 ADB (版本1.0.31 ),请查看here。
存储库包含一体化构建脚本以及 ARM的预编译二进制文件。
答案 2 :(得分:0)
我看到这个帖子已经很老了,无论如何它帮助了我。 我没找到
"用于ARM和GNU Make的Sourcery G ++ Lite。"
但是按照gcc 4的其他步骤设法构建/运行/为我的ARMv7:4.6.3-1ubuntu5