blitz-research/monkey2

Module std wont compile for android

Closed this issue · 3 comments

This line is the culprit (it uses EACCES, an undefined constant) but I have no idea how to fix it :

return EACCES; // can't provide write access to the apk

This is the error from the console :

***** Making module 'std' (android release armeabi-v7a gcc) *****

Parsing...
Semanting...
Translating...
Compiling...
[armeabi-v7a] Compile++ thumb: mx2_std <= filesystem.cpp
Build error: System command failed:

ndk-build

jni/../../../filesystem/native/filesystem.cpp:189:11: error: use of undeclared identifier 'EACCES'
          return EACCES; // can't provide write access to the apk
                 ^
1 error generated.
make: *** [/opt/android-ndk/build/core/build-binary.mk:500: obj/local/armeabi-v7a/objs/mx2_std/__/__/__/filesystem/native/filesystem.o] Error 1


***** Fatal mx2cc error *****

Replacing EACCES with NULL allows it to compile but that's probably not what it is supposed to be...

There has been a discussion about this on the forum some months ago. Might be your ndk not up-to-date?
http://monkeycoder.co.nz/forums/topic/error-use-of-undeclared-identifier-eacces/

Aha! That looks likely to be the culprit. Thanks abakobo.