Advertisement

Compile error when building as Android library

Started by October 11, 2015 11:55 PM
0 comments, last by howie_007 9 years, 1 month ago

I'm trying something crazy like seeing if I can port my game engine to Android to run on a phone or tablet. I'm just starting out (total Android noob), working my way through all the libraries I use. I'm automatically compiling with armeabi, armeabi-v7a and x86.

Compiling with x86 stops with the below error.


[x86] Compile++      : angelscript <= as_callfunc.cpp
jni/angelscript/source/as_callfunc.cpp: In function 'int CallSystemFunction(int, asCContext*)':
jni/angelscript/source/as_callfunc.cpp:694:8: error: exception handling disabled, use -fexceptions to enable
  catch(...)
        ^

I can get past the error by defining AS_NO_EXCEPTIONS in the make but once everything finishes, then this. Not really sure what's causing these errors. It will happen if I build armeabi or armeabi-v7a. So far, only x86 will produce a library file.


[armeabi] SharedLibrary  : libSDL2.so
[armeabi] SharedLibrary  : libangelscript.so
[x86] SharedLibrary  : libSDL2.so
[x86] SharedLibrary  : libangelscript.so
[armeabi-v7a] SharedLibrary  : libSDL2.so
jni/angelscript/source/as_callfunc_arm.cpp:223: error: undefined reference to 'armFunc'
jni/angelscript/source/as_callfunc_arm.cpp:229: error: undefined reference to 'armFuncR0'
jni/angelscript/source/as_callfunc_arm.cpp:259: error: undefined reference to 'armFuncR0R1'
jni/angelscript/source/as_callfunc_arm.cpp:266: error: undefined reference to 'armFuncObjLast'
jni/angelscript/source/as_callfunc_arm.cpp:269: error: undefined reference to 'armFuncR0ObjLast'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libangelscript.so] Error 1
make: *** Waiting for unfinished jobs....

Please let me know what you think and...

Thanks for all you do and the amazing AngelScript library!

My mistake. Sorry for the confusion.

I didn't notice you provide an Android.mk file for building with NDK. I wrote my own and was missing some configurations. Bah!

One thing I did notice is that the code is ignored when trying to build as a static library vs a shared library. Not sure why.

This topic is closed to new replies.

Advertisement