D:\dev\monkey2\bananas\gridshooter\gridshooter.buildv1.0.3x\android_debug_windows
[armeabi-v7a] Compile++ thumb: mx2_gridshooter <= gridshooter_gridshooter.cpp
cc1plus.exe: warning: command line option '-std=gnu99' is valid for C/ObjC but not for C++
In file included from jni/../src/../include/../../../../../modules/mojo/mojo.buildv1.0.3x/android_debug_windows/include/mojo_app_2wind
ow.h:9:0,
from jni/../src/../include/gridshooter_src_2renderwindow.h:10,
from jni/../src/../include/gridshooter_gridshooter.h:9,
from jni/../src/gridshooter_gridshooter.cpp:2:
jni/../src/../include/../../../../../modules/mojo/mojo.buildv1.0.3x/android_debug_windows/include/mojo_app_2view.h:9:95: fatal error:
../../../../monkey/monkey.buildv1.0.3x/android_debug_windows/include/monkey_types.h: No such file or directory
#include "../../../../monkey/monkey.buildv1.0.3x/android_debug_windows/include/monkey_types.h"
^
compilation terminated.
make: *** [obj/local/armeabi-v7a/objs-debug/mx2_gridshooter/__/src/gridshooter_gridshooter.o] Error 1
-------------------------------
...The file with the #include causing the problem is therefore here:
-------------------------------
> dir jni\..\src\..\include\..\..\..\..\..\modules\mojo\mojo.buildv1.0.3x\android_debug_windows\include\mojo_app_2view.h
Volume in drive D is New Volume
Volume Serial Number is 08F9-EDB9
Directory of D:\dev\monkey2\modules\mojo\mojo.buildv1.0.3x\android_debug_windows\include
21/08/2016 07:26 AM 5,842 mojo_app_2view.h
1 File(s) 5,842 bytes
0 Dir(s) 876,724,064,256 bytes free
-------------------------------
Concatenting the relative #include path gives us:
-------------------------------
> dir jni\..\src\..\include\..\..\..\..\..\modules\mojo\mojo.buildv1.0.3x\android_debug_windows\include\..\..\..\..\monkey\monkey.buildv1.0.3x\android_debug_windows\include\monkey_types.h
The filename or extension is too long.
-------------------------------
Aha! Dos gives a 'filename or extension is too long' error here - but it's only 180-ish bytes, so it's a bit weird. This missing file is definitely there, and it all compiles fine on mingw/macos/linux/emscripten.
So I think this is either a bug or limitation of NDK, not that it doesn't work like c++. I think I'll rework the #include system - it's all a bit convoluted because it's transpiler output.
Another thing - how do I set '-std=-gnu99' for c files only without getting a warning? If I use CFLALGS, I get the above warning 'this only works with C', but if I use CPP_FLAGS it wont be used with C files at all.
Bye!
Mark