1. Obtain the source code of curl to external/curl in the main directory of Android code.
2. Run the attached command line (long)
3. Return to the main directory of the android code, make libcurl or make curl.
If you have any questions, follow the procedure below: (reprinted, please keep the source, ye xunkai, QQ: 939849)
1. Return to the main directory of the android code
2. Make showcommands 1> 1.txt 2> 2.txt( wait for a while)
3. Compare the content in the CommandLine with 1.txt and add the missing content.
-I/D supplement cppflags
-W/-M/-F/-O/-nostdlib added to cflags
-WL/L/-L supplemented to libs
-C/-O/-MD, all do not
----------------------------------------------------------------------------------
Note: change a $ to your own code directory
A =/home/William/Android-Src & amp ;/
Path = & quot; $ A/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin: $ Path & quot ;/
./Configure -- Host = arm-Linux/
/
Cc = arm-Eabi-gcc/
/
Cppflags = & quot; -I $ A/system/CORE/include-I $ A/hardware/libhardware/include-I $ A/hardware/libhardware_legacy/include-I $ A/hardware/RIL/include -I $ A/Dalvik/libnativehelper/include-I $ A/frameworks/base/OpenGL/include-I $ A/external/skia /include
-I $ A/out/target/product/generic/obj/include-I $ A/bionic/libc/arch-arm/include-I $ A/bionic/libc/include -I $ A/bionic/libstdc ++/include-I $ A/bionic/libc/kernel/common-I $ A/bionic/libc/kernel/arch-arm-I $ A/bionic/libm/include-I $ A/bionic/libm/include/ARCH/ARM
-I $ A/bionic/libthread_db/include-I $ A/external/curl/include/-I external/curl/lib-I $ A/external/curl-I $/out/target/product/generic/obj/static_libraries/libcurl_intermediatesc-d1_arm_arch_5 _-prop _-d1_arm_arch_5te _-I $ A/system/CORE/include/ARCH/Linux -Arm/
-Include $ A/system/CORE/include/ARCH/Linux-arm/androidconfig. H-dandroid-dhave_config_h-dsk_release-dndebug & quot ;/
/
Cflags = & quot;-nostdlib-bdynamic-wl,-T, $ A/build/CORE/armelf. x-wl,-dynamic-linker, $ A/system/bin/linker-wl, -- GC-sections-wl,-Z, nocopyreloc-L $ A/out/target/product/generic/obj/lib-wl, -rpath-link = $ A/out/target/product/generic/obj/lib-LC-lstdc ++-LM $ A/out/target/product/generic/obj/ LIB/crtbegin_dynamic.o
-Wl, -- no-undefined $ A/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin /.. /lib/GCC/ARM-Eabi/4.4.0/interwork/libgcc. A $ A/out/target/product/generic/obj/lib/crtend_android.o & quot ;/
/
Lib = & quot; -L $ A/out/target/product/generic/obj/lib/crtbegin_dynamic.o-LC-wl $ A/prebuilt/linux-x86 /toolchain/arm-eabi-4.4.0/lib/GCC/ARM-Eabi/4.4.0/interwork/libgcc. A $ A/development/ndk/build/platforms/Android-4/arch-arm/usr/lib/crtbegin_dynamic.o
$ A/development/ndk/build/platforms/Android-4/arch-arm/usr/lib/crtend_android.o & quot;