Thanks for this great tutorial @ar2rsawseen. The Gideros website says that "A plugin consists of a C, C++, Obj-C or Java code compiled for the target platform." Why these particular languages? Is there something special about them...? And would the process of writing a function in C++ be very similar to this explanation for Java...?
@BJG Java and Objective-C are based on their platform. Basically Java is used if you want to wrap something from additional Android functionalities, and Objective-C is same for IOS plugins.
But you could also create plugins in plain C or C++ as TNT Collision engine, that does something inside their own environment and has nothing to do with platform specifics. And this C or C++ code can be compiled as both Android and IOS plugins (additionally also as Desktop plugins).
So basically: Java + C = to wrap something from Android SDK Objective-C + C = to wrap something from IOS SDK plain C to usually perform some huge calculations and can work on both platforms.
Comments
www.tntengine.com
Cheers
evs
Thanks, I can access it in my workplace.
https://sites.google.com/site/xraystudiogame
But you could also create plugins in plain C or C++ as TNT Collision engine, that does something inside their own environment and has nothing to do with platform specifics. And this C or C++ code can be compiled as both Android and IOS plugins (additionally also as Desktop plugins).
So basically:
Java + C = to wrap something from Android SDK
Objective-C + C = to wrap something from IOS SDK
plain C to usually perform some huge calculations and can work on both platforms.
I am following your example with my own simple library, but, i still get errors when building .so :
error: undefined reference to 'luaL_register'
error: undefined reference to 'lua_getfield'
error: undefined reference to 'lua_pushcclosure'
and so on as if i haven't included the lua/luasocket library.
have been trying for hours and I still don't have any clue, please help me. any clue ?
Thanks
for latest version, you need to link couple more binaries, not only libgideros.so
including zlib also depends on the version, I think the latest one did not need to include it separately
there is no
#
# Lua
#
include $(CLEAR_VARS)
LOCAL_MODULE := lua
LOCAL_SRC_FILES := ../../libs/$(TARGET_ARCH_ABI)/liblua.so
include $(PREBUILT_SHARED_LIBRARY)
In my Android.mk, no wonder it always miss reference to lua function, I am stupid didn't realize it earlier
thanks Artur !
note: it will be nice if you update your tutorial to the latest version, because it helps so much especially for beginner like me