0
我試圖編譯我的cocos2d-X項目,但是當我運行build_native.sh我得到這個錯誤:多重定義zlib的
/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 //.....
我可以建立項目,而不zlib的,但我需要它。
編輯:
去除example.c後,我得到這個:
/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
我可以排除的libtiff從cocos2d的或者我怎麼能解決這個問題?
我刪除了示例,但現在我得到與tiff.a – McDermott 2013-02-22 10:11:17
相同的錯誤我們檢查並清除了make文件。它現在有效。謝謝您的幫助! – McDermott 2013-02-26 12:08:46