Comments (4)
I figured out how to fix this error.
Add the following code in ofxLua/libs/lua/luaconf.h
file: (e.g. in line 75)
#if defined(LUA_USE_ANDROID)
#include <android/log.h>
#define lua_getlocaledecpoint() '.'
#define lua_writestring(s,l) __android_log_write(ANDROID_LOG_DEBUG, "LUA_PRINT", (s))
#define lua_writeline() __android_log_write(ANDROID_LOG_DEBUG, "LUA_PRINT", "\n")
#define lua_writestringerror(s,p) __android_log_print(ANDROID_LOG_ERROR, "LUA_PRINT", (s), (p))
#endif
And add the followings in ofxLua/addon_config.mk
android/armeabi:
ADDON_CFLAGS += -DLUA_USE_ANDROID
ADDON_SOURCES_EXCLUDE += src/bindings/desktop/% src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/desktop/% src/bindings/linuxarm/%
android/armeabi-v7a:
ADDON_CFLAGS += -DLUA_USE_ANDROID
ADDON_SOURCES_EXCLUDE += src/bindings/desktop/% src/bindings/linuxarm/%
ADDON_INCLUDES_EXCLUDE += src/bindings/desktop/% src/bindings/linuxarm/%
In Android Studio, the exclude flags had no effect on the project (maybe a bug) so I had to manually remove the 2 folders (desktop, linuxarm) from ofxLua/src/bindings
directory.
Also, to make Android Studio read the C flags from the addon_config.mk
file, I had to add the following code below cppFlags.addAll(addonCppFlags(abi, ofRoot()))
in build.gradle
file.
CFlags.addAll(addonCppFlags(abi, ofRoot()))
After the fix, I could successfully build and run ofxLua project on an Android device.
from ofxlua.
I've rolled your suggestions into the feature/android
branch. Can you check that it builds for Android? The AS project fix steps are included in the readme.
Also, if those project issues are related to the OF ProjecGenerator, I suggest opening an issue with the OF PG repo.
from ofxlua.
Closing for now.
from ofxlua.
The feature/android
branch is merged now. Please test it when you can and we can go from there.
from ofxlua.
Related Issues (20)
- ofBindings.cpp not compiling anymore on linux, HOT 5
- How to call OF functions that take pointer argument HOT 3
- ofFboSettings ignored? HOT 2
- Cannot include "glm/gtc/functions.hpp" in OF 0.11.0 HOT 8
- ofxLua projects compiled for debugging crashes on start HOT 10
- Problem adding vertex to mesh HOT 4
- error getting unique faces from 3D primitive HOT 3
- Compile error on pi3b+ ofxLuaBindings HOT 11
- bad swig reference? HOT 1
- example not compiling on linux debian buster HOT 13
- Semantic issue: ofxLuaBindings.cpp No viable overloaded '=' HOT 15
- getErrorMessage() is not defined anymore HOT 4
- fails to compile on Arch (Manjaro) due to Boost version? HOT 1
- Compile Error on ofxLuaFileWriter.cpp ofToDataPath() HOT 1
- of::filesystem::path HOT 11
- ostringstream instead of stringstream HOT 4
- wrap oF 0.12 additions
- luaL_openlibs() does work with ofxLua but not with ofxOfelia since the update to Lua 5.4.6
- luaExample Visual Studio getAsTimespec() HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ofxlua.