Backstory: In order to freshen up and relearn C++ and OOP programming in general, I'm rewriting a game I made in Tier 1 into Tier 2.
I'm wanting to still write once and deploy to Windows + Android.
Wow am I noticing a huge difference in standards between GCC (or Make) & VC++. I have code that works fine in VC++ and I'm under the impression that in order to compile it for Android I need to copy my source files (the ones that I wrote) into the /jni/ folder, and add them to the Android.mk source file list.
It seems to be compiling OK, but fails during the linking process. It's claiming it's running into multiple definitions of the same functions. I can assure you I've only defined my functions once, and I have made precautions avoiding circular dependencies.
Anyway, I'm going to zip up my source files here, I've removed the actual game code. I just want the skeleton app to work. Notice in Application.mk I added the line: APP_STL := stlport_static in order to use the std library (like vector<>, etc).
/cygdrive/c/Development/androidndk/android-ndk-r6b/build/core/build-binary.mk:220: warning: overriding recipe for target `/cygdrive/c/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o'
/cygdrive/c/Development/androidndk/android-ndk-r6b/build/core/build-binary.mk:217: warning: ignoring old recipe for target `/cygdrive/c/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o'
/cygdrive/c/Development/androidndk/android-ndk-r6b/build/core/build-binary.mk:220: warning: overriding recipe for target `/cygdrive/c/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi-v7a/objs/template/main.o'
/cygdrive/c/Development/androidndk/android-ndk-r6b/build/core/build-binary.mk:217: warning: ignoring old recipe for target `/cygdrive/c/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi-v7a/objs/template/main.o'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::PopScreen()':
C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: multiple definition of `app::PopScreen()'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: multiple definition of `App'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::LoadImages()':
C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:77: multiple definition of `app::LoadImages()'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:77: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::End()':
C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: multiple definition of `app::End()'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/androidndk/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.h:200: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::Loop()':
C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:26: multiple definition of `app::Loop()'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:26: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::ChangeScreen(ShoeScuffle::Screen*)':
C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:43: multiple definition of `app::ChangeScreen(ShoeScuffle::Screen*)'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:43: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::Begin()':
C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:14: multiple definition of `app::Begin()'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:14: first defined here
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o: In function `app::PushScreen(ShoeScuffle::Screen*)':
C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:54: multiple definition of `app::PushScreen(ShoeScuffle::Screen*)'
C:/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/objs/template/main.o:C:/Development/IDE/templates/shoe-scuffandroid/jni/main.cpp:54: first defined here
collect2: ld returned 1 exit status
make: *** [/cygdrive/c/Development/IDE/templates/shoe-scuffandroid/obj/local/armeabi/libtemplate.so] Error 1