title: Multiple definition of main for zlib
body: <p>I am trying to compile my cocos2d-x project, but when I run the build_native.sh I get this error:</p>
  
  <pre><code>/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 //.....
  </code></pre>
  
  <p>I can build the project without zlib, but I need it.</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>After removing example.c, I get this:</p>
  
  <pre><code>/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
  </code></pre>
  
  <p>Can I exclude libtiff from cocos2d or how can I fix this?</p>