android - Multiple definition of main for zlib -
i trying compile cocos2d-x project, when run build_native.sh error:
/users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi/objs-debug/game_shared/__/__/classes/3rdparty/zlib-1.2.3/minigzip.o: multiple definition of 'main' /users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs-debug/game_shared/__/__/classes/3rdparty/zlib-1.2.3/example.o: previous definition here /users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi/tiff.a(mkg3states.o): multiple definition of 'main' /users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs-debug/game_shared/__/__/classes/3rdparty/zlib-1.2.3/example.o: previous definition here collect2: ld returned 1 exit status make: *** [obj/local/armeabi/libgame.so] error 1 make: leaving directory //.....
i can build project without zlib, need it.
edit:
after removing example.c, this:
/users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi/tiff.a(mkg3states.o): multiple definition of 'main' /users/default/documents/development/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs-debug/game_shared/__/__/classes/3rdparty/zlib-1.2.3/minigzip.o: previous definition here
can exclude libtiff cocos2d or how can prepare this?
both minigzip
, example
source code files contain main()
function. remove 1 don't need. i'm guessing it's in example
.
android android-ndk jni cocos2d-x
No comments:
Post a Comment