Android NDK/JNI: compilation error on my Android/iOS hybrid project using build_native.sh

Hi !

I am trying to create an Android/iOS hydrid project following this turorial: http://gameit.ro/2012/01/creating-an-iphone-and-android-cocos2d-x-hybrid-project-updated/#comment-640

I did exactly what is described in this tutorial but at the end when I do a “make clean” and then “build_native.sh”, I get the following error during compilation:

SharedLibrary : libgame_logic.so
/Applications/Android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: cannot find -lcurl
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libgame_logic.so] Error 1

Any idea how to solve this issue?

Thanks !

If your game isn’t depends on libcurl, which offers http access API, you can remove libcurl dependency from makefile, then try once more.
Creating hybrid project would change the path relationship in header search path & link search path, can probably lead to this error.