Hey all!
So I wrote my AppGameKit Tier 2 project in Visual Studio, and the whole project runs fine. But now I want it to compile on Android!
So I load up the template (thanks Ancient Lady) and get all that compiling. It works fine, and whenever I change the source code and recompile the changes work successfully on Android.
Now in my main Visual Studio project I basically have every header included inside a "includes.h". Every .cpp file has #include "includes.h" at the beginning of the file.
I added all of the .cpp and .h files into the Eclipse project by right clicking on the "jni" folder, clicking New->File and then copying and pasting the contents of the Visual Studio .h and .cpp files one by one into the Eclipse project. When I check the "includes.h" file, there are no red squiggly lines under any of the header files it has included, which means it can clearly detect them.
However, when I try to compile these are the contents of the log file:
http://pastebin.com/JNckjJvN
I understand that this may indeed be a problem on my part, and not AGK. If anyone would be as kind as to point me in the direction to debug why template.cpp is not using the includes.h file properly that would be fantastic.
Thanks!
EDIT: Found a file named Android.mk and added my .cpp files to that. Seemed to have fixed the problem and now the program compiles. My issue now is that the program's behaviour is substantially different from my Visual Studio's one. Switch statements aren't being executed, images aren't being displayed and there are a whole heap of other behaviour-related issues as well. It's unfortunate that it requires this much effort to "code once, deploy everywhere". Guess I'm going to have to code both versions at the same time for my next project to make sure everything works in stages T_T
EDIT 2: Problem solved. The rest of the issue was poor performance on my behalf. It turns out Visual Studio lets me practice a lot of bad habits that GCC/G++ (or whatever compiler ndk is using) does not take a liking to. Most of these problems involved externally defined variables. Nonetheless my game is working flawlessly on both Windows and Android. I apologise to TGC for incorrectly blaming them when it was my wrong-doing.
www.kuics.com - KUICS Australia PTY LTD