Git Product home page Git Product logo

ofxlua's People

Contributors

abigpotostew avatar averagehat avatar chaosct avatar danomatika avatar gregsadetsky avatar johnkingsley avatar jonathhhan avatar memo avatar totalgee avatar underdoeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxlua's Issues

pushTable error when table in another table

Hi~
I got a error when I use getStringVector function after push table for global.
I think it caused at line 532, 533 : ofxLua.cpp

lua_gettable(L, LUA_STACK_TOP);
if(!lua_istable(L, LUA_STACK_TOP))

It actually need to be 'LUA_STACK_TOP - 1' . Isn't it?

Thanks! ofxLua is really good!!!

ofxLua projects compiled for debugging crashes on start

Bringing this over from #57


Hi, I just tried to run luaExample on Arch Linux and it crashes silently.
In the debugger I see this:

1  glm::vec<4, float, (glm::qualifier)0> glm::operator *<float, (glm::qualifier)0>(glm::vec<4, float, (glm::qualifier)0> const&, float const&)                                                                                   type_vec4.inl                                                                          866  0x5555559444d8 
2  glm::mat<4, 4, float, (glm::qualifier)0> glm::translate<float, (glm::qualifier)0>(glm::mat<4, 4, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&)                                              matrix_transform.inl                                                                   13   0x555555a1c2b6 
3  ofNode::createMatrix()                                                                                                                                                                                                        ofNode.cpp                                                                             676  0x555555b6cb12 
4  ofNode::setPosition(glm::vec<3, float, (glm::qualifier)0> const&)                                                                                                                                                             ofNode.cpp                                                                             182  0x555555b6a191 
5  ofNode::ofNode()                                                                                                                                                                                                              ofNode.cpp                                                                             13   0x555555b69399 
6  of3dPrimitive::of3dPrimitive()                                                                                                                                                                                                of3dPrimitives.cpp                                                                     20   0x555555b4f599 
7  ofPlanePrimitive::ofPlanePrimitive(float, float, int, int, ofPrimitiveMode)                                                                                                                                                   of3dPrimitives.cpp                                                                     294  0x555555b50cc1 
8  of3dGraphics::of3dGraphics(ofBaseRenderer *)                                                                                                                                                                                  of3dGraphics.cpp                                                                       32   0x555555b33fb6 
9  ofGLRenderer::ofGLRenderer(ofAppBaseWindow const *)                                                                                                                                                                           ofGLRenderer.cpp                                                                       24   0x555555cba9a9 
10 void __gnu_cxx::new_allocator<ofGLRenderer>::construct<ofGLRenderer, ofAppGLFWWindow *>(ofGLRenderer *, ofAppGLFWWindow *&&)                                                                                                  new_allocator.h                                                                        147  0x555555c3a879 
11 void std::allocator_traits<std::allocator<ofGLRenderer>>::construct<ofGLRenderer, ofAppGLFWWindow *>(std::allocator<ofGLRenderer>&, ofGLRenderer *, ofAppGLFWWindow *&&)                                                      alloc_traits.h                                                                         484  0x555555c3a5b6 
12 std::_Sp_counted_ptr_inplace<ofGLRenderer, std::allocator<ofGLRenderer>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<ofAppGLFWWindow *>(std::allocator<ofGLRenderer>, ofAppGLFWWindow *&&)                           shared_ptr_base.h                                                                      548  0x555555c3a124 
13 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ofGLRenderer, std::allocator<ofGLRenderer>, ofAppGLFWWindow *>(ofGLRenderer *&, std::_Sp_alloc_shared_tag<std::allocator<ofGLRenderer>>, ofAppGLFWWindow *&&) shared_ptr_base.h                                                                      679  0x555555c39aca 
14 std::__shared_ptr<ofGLRenderer, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<ofGLRenderer>, ofAppGLFWWindow *>(std::_Sp_alloc_shared_tag<std::allocator<ofGLRenderer>>, ofAppGLFWWindow *&&)                      shared_ptr_base.h                                                                      1344 0x555555c395f2 
15 std::shared_ptr<ofGLRenderer>::shared_ptr<std::allocator<ofGLRenderer>, ofAppGLFWWindow *>(std::_Sp_alloc_shared_tag<std::allocator<ofGLRenderer>>, ofAppGLFWWindow *&&)                                                      shared_ptr.h                                                                           359  0x555555c39005 
16 std::shared_ptr<ofGLRenderer> std::allocate_shared<ofGLRenderer, std::allocator<ofGLRenderer>, ofAppGLFWWindow *>(std::allocator<ofGLRenderer> const&, ofAppGLFWWindow *&&)                                                   shared_ptr.h                                                                           702  0x555555c38595 
17 std::shared_ptr<ofGLRenderer> std::make_shared<ofGLRenderer, ofAppGLFWWindow *>(ofAppGLFWWindow *&&)                                                                                                                          shared_ptr.h                                                                           718  0x555555c37d32 
18 ofAppGLFWWindow::setup(ofGLFWWindowSettings const&)                                                                                                                                                                           ofAppGLFWWindow.cpp                                                                    204  0x555555c329dd 
19 ofAppGLFWWindow::setup(ofGLWindowSettings const&)                                                                                                                                                                             ofAppGLFWWindow.cpp                                                                    149  0x555555c324a4 
20 ofAppBaseGLWindow::setup(ofWindowSettings const&)                                                                                                                                                                             ofAppBaseWindow.h                                                                      113  0x555555c375c1 
21 ofMainLoop::createWindow(ofWindowSettings const&)                                                                                                                                                                             ofMainLoop.cpp                                                                         69   0x555555c3b026 
22 ofCreateWindow(ofWindowSettings const&)                                                                                                                                                                                       ofAppRunner.cpp                                                                        222  0x555555c2a2f8 
23 ofSetupOpenGL(int, int, ofWindowMode)                                                                                                                                                                                         ofAppRunner.cpp                                                                        217  0x555555c2a25e 
24 main                                                                                                                                                                                                                          main.cpp                                                                               15   0x555555a78a79 
25 __libc_start_main                                                                                                                                                                                                             (x86_64) /usr/lib/libc.so.6                                                                 0x7ffff598d153 
26 _start                                                                                                                                                                                                                        (x86_64) /home/fp/src/openFrameworks/addons/ofxLua/luaExample/bin/luaExample_debug      0x5555555d6dae 

Any ideas?

Originally posted by @hamoid in #57 (comment)


I'm just running luaExample unmodified, I don't know which script it is running. It's my first attempt at ofxLua. This is the output:

10:29:25: Starting /home/fp/src/openFrameworks/addons/ofxLua/luaExample/bin/luaExample_debug ...
ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 pid=22528 comm="luaExample_debu" exe="/home/fp/src/openFrameworks/addons/ofxLua/luaExample/bin/luaExample_debug" sig=11 res=1
10:29:25: The program has unexpectedly finished.
10:29:25: The process was ended forcefully.
10:29:25: /home/fp/src/openFrameworks/addons/ofxLua/luaExample/bin/luaExample_debug crashed.

So it compiles fine and closes immediately. Can I help figure it out?

update: based on this

	scripts.push_back("scripts/graphicsExample.lua");
	scripts.push_back("scripts/imageLoaderExample.lua");
	scripts.push_back("scripts/polygonExample.lua");
	scripts.push_back("scripts/fontsExample.lua");
	currentScript = 0;

it is running graphicsExample.lua. Changing currentScript to 1, 2 or 3 also crash.

Originally posted by @hamoid

Problem adding vertex to mesh

When I run the following:

local mesh = of.Mesh()
mesh:setMode(of.PRIMITIVE_POINTS)
local top = glm.vec3(100.0, 50.0, 0.0)
mesh:addVertex(top)

I get this error:

Error in Mesh_addVertex (arg 2), expected 'ofDefaultVertexType *' got 'glm::vec3 *'

Same thing if I use of.Vec3f() for the vertex...Anything to try from lua end? or is this a problem with the bindings?

Create a New ofxLua Project failed

Hi Dan, I try to develop my own project based on ofxLua, simply copy an example project and rename it at 3 levels down in the openframeworks folder, but I am taking the error:

screen shot 2015-03-27 at 1 29 39 pm
Any help?
Thanks in advance.

Compile error on pi3b+ ofxLuaBindings

Just getting started with OF and trying to get ofxLua compiled.

I copied the luaExample to myApps and then copied the Makefile and config.make from emptyExample to luaExample.

on make I'm getting the following error:

/home/we/openFrameworks/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: At global scope:
/home/we/openFrameworks/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:16363:12: warning: ‘int _wrap_3dPrimitive_draw(lua_State*)’ defined but not used [-Wunused-function]
 static int _wrap_3dPrimitive_draw(lua_State* L) { int SWIG_arg = 0; of3dPrimitive *arg1 = (of3dPrimitive *) 0 ;
            ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/home/we/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:360: /home/we/openFrameworks/addons/obj/linuxarmv6l/Release/ofxLua/src/bindings/linuxarm/ofxLuaBindings.o] Error 1
make[1]: Leaving directory '/home/we/openFrameworks/apps/myApps/luaExample'
make: *** [/home/we/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

I tried this with the current version of ofxLua and then tried checking out 1.3.0 instead. On the current release, the compile freezes at this stage with the Pi's disk activity led on full. On 1.3.0, it errors with the above.

This is a Raspberry Pi 3b+ with Buster (4.19.66-v7+), gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1). OF 0.11.0

Android?

Hello!
Does ofxLua work on android?

Replace Luabind with SWIG

Hi,

Congratulations for your work!
I have never used swig but I heard a lot of good things about it. I was wondering if you used it, and if we could easily and automatically generate wrappers with it.

(I don't know if this is the right place for my comments, but I can't find any other place)

Thanks!

How to express stream operator in ofxLua?

Hi, I'm trying to convert the following OF code to Lua script.

ofFile file;
file.open(ofToDataPath("foo.txt"), ofFile::WriteOnly, false);
file << "Hello World : " << 123 << endl;
file.close();

I simply tried the following in Lua. (ofxLua)

local file = of.File();
file:open("foo.txt");
file << "Hello World : " << 123 << endl;
file:close();

But it says syntax error.
If I remove the third line which uses the stream operators, I no longer get the error.

Is it possible to mimic the above OF code in Lua?
Thanks in advance!

"unresolved external symbol" error on Visual Studio 2015.

Hello, I have an issue for executing ofxLua example on Visual Studio 2015.

When I build the luaExample project, I get the "unresolved external symbol" error.
error LNK2001: unresolved external symbol "_lua_gettop" (_SWIG_Lua_class_register)

Lua libraries are seems to be compiled(obj files are crearted in obj folder), but linker failed.

I'm working on openframeworks 0.9.8 for Windows(Visual Studio 2015).
I cloned ofxLua on addon folder, and ran command "git submodule init", "git submodule init".

Thanks.

Cannot build ofxLua on Android Studio

I can build an empty OF project without problems but when I add ofxLua, I cannot build the project. (I used Project Generator to create a project)

Here's the screenshot of errors I get:
Screen Shot 2019-06-13 at 10 54 03 PM

Any advice or guidance would be greatly appreciated.

ofBindings.cpp not compiling anymore on linux,

i'm trying to compile ofxLua on master and oF 0.10, and in both case i cannot because of this error on ofBindings.cpp compilation:

/home/xxx/of_v0.10.1_linux64gcc6_release/addons/ofxLua/src/bindings/desktop/ofBindings.cpp:42883:109: error: no match for ‘operator=’ (operand types are ‘SwigValueWrapper<ofXml::Range<ofXmlIterator<pugi::xml_attribute_iterator> > >’ and ‘ofXml::Range<ofXmlAttributeIterator>’)
 ail_ptr("Xml_getAttributes",1,SWIGTYPE_p_ofXml); }  result = ((ofXml const *)arg1)->getAttributes(); {
                                                                                                   ^

also a really really long list of warnings is generated, mostly about misleading indents and unused variables ( almost for each binded function )

/home/xxx/of_v0.10.1_linux64gcc6_release/addons/ofxLua/src/bindings/desktop/ofBindings.cpp:42354:36: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
   if (arg1) (arg1)->height = arg2; return SWIG_arg; if(0) SWIG_fail; fail: lua_error(L); return SWIG_arg; }
                                    ^~~~~~
/home/xxx/of_v0.10.1_linux64gcc6_release/addons/ofxLua/src/bindings/desktop/ofBindings.cpp: In function ‘int _wrap_new_FpsCounter(lua_State*)’:
/home/xxx/of_v0.10.1_linux64gcc6_release/addons/ofxLua/src/bindings/desktop/ofBindings.cpp:42516:63: warning: unused variable ‘argv’ [-Wunused-variable]
 static int _wrap_new_FpsCounter(lua_State* L) { int argc; int argv[2]={ 1,2} ; argc = lua_gettop(L); if (argc == 0) {
                                                    

I've also tried updating the bindings by getting the swig submodule and using make in the swig folder, but the result is the same. By making the bindings i noticed this warning that could be related to the issue:

../../../libs/openFrameworks/utils/ofXml.h:148: Warning 509: Overloaded method ofXml::removeAttribute(ofXml::Attribute &&) effectively ignored,
../../../libs/openFrameworks/utils/ofXml.h:147: Warning 509: as it is shadowed by ofXml::removeAttribute(ofXml::Attribute const &).

VS 2015 Compilation Error

Hello!
I'm finding some trouble in order to compile the plugin: currently the VS give me this error message:
Error C3861 'chdir': identifier not found. When I navigate to the line 163 from the file 'ofxLua.cpp' , I find this: chdir(folder.c_str());

I searched the web and I found this interesting post:
http://stackoverflow.com/questions/3485166/change-the-current-working-directory-in-c
There, I read chdir is deprecated for MS, and the correct method name is _chdir. (About that, I really don't know) Thank you.

ofFboSettings ignored?

In order to call the function getDepthTexture() I need to set the two properties "useDepth" and "depthStencilAsTexture" of the ofFbo class.

I tried using ofFboSettings but it didn't work, as far as I can tell it is ignored in the swig files:

114 | %ignore ofFboSettings;
115 | %ignore ofFbo::Settings;
116 | %ignore allocate(ofFboSettings);

Is there another way to set these properties and get a depth texture using ofxLua?

Doc Request: adding OF capabilities

I added the following code to LuaWrapper.h:

                class_<ofVideoGrabber>("videograbber")
                    .def(constructor<>())
                    .def("initGrabber", (bool(ofVideoGrabber::*)(int,int)) &ofVideoGrabber::initGrabber)
                    .def("initGrabber", (bool(ofVideoGrabber::*)(int,int,bool)) &ofVideoGrabber::initGrabber)
                    .def("listDevices", &ofVideoGrabber::listDevices)
                    .def("setDeviceID", &ofVideoGrabber::setDeviceID)
                    .def("getHeight", &ofVideoGrabber::getHeight)
                    .def("getWidth", &ofVideoGrabber::getWidth)
                    .def("close", &ofVideoGrabber::close),

The linking step generates errors like:

Undefined symbols for architecture i386:
  "_kCVPixelBufferWidthKey", referenced from:
      -[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)

I noticed there isn't a wiki, and I'd love to get unstuck and capture the required knowledge.

Using OSX + xcode (though I'm not proficient with xcode).

example not compiling on linux debian buster

Hi there,

great looking addon, having some trouble getting the libraries to compile on linux debian.

from the ofxLua main directory, I'm running the following on the command line:

projectGenerator -o"/home/adam/openFrameworks" -a"ofxLua" ./luaExample
cd ./luaExample
make > error.log 2>&1

produces the following:

Compiling OF library for Release
make[1]: Entering directory '/home/adam/openFrameworks/libs/openFrameworksCompiled/project'
Done!
make[1]: Leaving directory '/home/adam/openFrameworks/libs/openFrameworksCompiled/project'


Compiling luaExample for Release
make[1]: Entering directory '/home/adam/openFrameworks/addons/ofxLua/luaExample'
Linking bin/luaExample for linux64
g++ -o bin/luaExample  obj/linux64/Release/src/ofApp.o obj/linux64/Release/src/main.o  /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/bindings/glmBindings.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/bindings/desktop/ofBindings.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/ofxLua.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/ofxLuaFileWriter.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lstring.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lmem.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lutf8lib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ltable.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lvm.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/loslib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ldump.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/linit.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lbitlib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ldebug.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lzio.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lauxlib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lcode.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lstate.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lapi.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lmathlib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lstrlib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ltablib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lctype.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lcorolib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lgc.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lbaselib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lparser.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/llex.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lundump.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lfunc.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ldblib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/loadlib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lopcodes.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/liolib.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ltm.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/ldo.o /home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/libs/lua/lobject.o  /home/adam/openFrameworks/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a   -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections -fuse-ld=gold -L/home/adam/openFrameworks/libs/fmod/lib/linux64/ -lfmod /home/adam/openFrameworks/libs/kiss/lib/linux64/libkiss.a /home/adam/openFrameworks/libs/tess2/lib/linux64/libtess2.a   -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lpulse-simple -lpulse -lasound -lGLEW -lGLU -lGL -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama
/home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/bindings/glmBindings.o:glmBindings.cpp:function _wrap_fma: error: undefined reference to 'glm::vec<2, float, (glm::qualifier)0> glm::fma<glm::vec<2, float, (glm::qualifier)0> >(glm::vec<2, float, (glm::qualifier)0> const&, glm::vec<2, float, (glm::qualifier)0> const&, glm::vec<2, float, (glm::qualifier)0> const&)'
/home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/bindings/glmBindings.o:glmBindings.cpp:function _wrap_fma: error: undefined reference to 'glm::vec<3, float, (glm::qualifier)0> glm::fma<glm::vec<3, float, (glm::qualifier)0> >(glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&)'
/home/adam/openFrameworks/addons/obj/linux64/Release/ofxLua/src/bindings/glmBindings.o:glmBindings.cpp:function _wrap_fma: error: undefined reference to 'glm::vec<4, float, (glm::qualifier)0> glm::fma<glm::vec<4, float, (glm::qualifier)0> >(glm::vec<4, float, (glm::qualifier)0> const&, glm::vec<4, float, (glm::qualifier)0> const&, glm::vec<4, float, (glm::qualifier)0> const&)'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/adam/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: bin/luaExample] Error 1
make[1]: Leaving directory '/home/adam/openFrameworks/addons/ofxLua/luaExample'
make: *** [/home/adam/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

It seems like there is some issue with the syntax of those glm::vec objects in the file "glmBindings.cpp" which is generated by "generate_bindings.sh"

Does the syntax glm::vec<2, float (glm::qualifier)0)> seem a bit funny to you?

[REQUEST] to remove 'script' on functions

really getting into ofxLua, want to use it fully for game making within openFrameworks, so thanks.

one thing i would like to request is that instead of having say 'lua.scriptSetup() or lua.scriptUpdate(), how about just having lua.update()/ lua.setup() / lua.draw() etc. just more to stay in tune with openframeworks. it would also be less confusing.

i understand why to some degree but think that would help

thanks

misplaced statement in bool ofxLua::exists(const string& name, int type)

Hi Dan,

I came across a problem in the function bool ofxLua::exists(const string& name, int type).

In line 1081 the named field that is to be tested is pushed on the stack. And in the line after that, you want to make sure that the top of the stack before this push is a table. I think you should test LUA_STACK_TOP-1. Or move line 1081 to just before 1088.

Cannot build luaExample using of-0.10.0 branch

Hi, I just downloaded openFrameworks 0.10.0 and ofxLua-of-0.10.0 on macOS and then I opened luaExample on Xcode using the Project Generator.

However, when I build the project, I get the following errors.

/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13961:77: error: unknown type name 'ofMeshData'; did you mean 'ofMeshFace'?
static int _wrap_MeshData_getVerticesData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                            ^~~~~~~~~~
                                                                            ofMeshFace
In file included from /Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:2912:
In file included from ../../../libs/openFrameworks/ofMain.h:49:
In file included from ../../../libs/openFrameworks/gl/ofGLRenderer.h:4:
In file included from ../../../libs/openFrameworks/graphics/of3dGraphics.h:12:
In file included from ../../../libs/openFrameworks/3d/of3dPrimitives.h:3:
../../../libs/openFrameworks/3d/ofMesh.h:708:7: note: 'ofMeshFace' declared here
using ofMeshFace = ofMeshFace_<ofDefaultVertexType, ofDefaultNormalType, ofDefaultColorType, ofDefaultTexCoordType>;
      ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13961:97: error: use of undeclared identifier 'ofMeshData'
static int _wrap_MeshData_getVerticesData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                                                ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13961:109: error: expected expression
static int _wrap_MeshData_getVerticesData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                                                            ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13962:21: error: use of undeclared identifier 'ofArrayView'
  SwigValueWrapper< ofArrayView< void > > result; SWIG_check_num_args("ofMeshData::getVerticesData",1,1)
                    ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13962:39: error: expected '(' for function-style cast or type construction
  SwigValueWrapper< ofArrayView< void > > result; SWIG_check_num_args("ofMeshData::getVerticesData",1,1)
                                 ~~~~ ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13966:3: error: use of undeclared identifier 'result'
  result = ((ofMeshData const *)arg1)->getVerticesData(); {
  ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13966:14: error: use of undeclared identifier 'ofMeshData'
  result = ((ofMeshData const *)arg1)->getVerticesData(); {
             ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13967:5: error: use of undeclared identifier 'ofArrayView'
    ofArrayView< void > * resultptr = new ofArrayView< void >((const ofArrayView< void > &) result);
    ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13967:23: error: expected '(' for function-style cast or type construction
    ofArrayView< void > * resultptr = new ofArrayView< void >((const ofArrayView< void > &) result);
                 ~~~~ ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13967:27: error: use of undeclared identifier 'resultptr'
    ofArrayView< void > * resultptr = new ofArrayView< void >((const ofArrayView< void > &) result);
                          ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13967:43: error: unknown type name 'ofArrayView'
    ofArrayView< void > * resultptr = new ofArrayView< void >((const ofArrayView< void > &) result);
                                          ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13968:35: error: use of undeclared identifier 'resultptr'
    SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_ofArrayViewT_void_t,1); SWIG_arg++; }  return SWIG_arg; if(0) SWIG_fail;
                                  ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13970:76: error: unknown type name 'ofMeshData'; did you mean 'ofMeshFace'?
static int _wrap_MeshData_getNormalsData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                           ^~~~~~~~~~
                                                                           ofMeshFace
In file included from /Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:2912:
In file included from ../../../libs/openFrameworks/ofMain.h:49:
In file included from ../../../libs/openFrameworks/gl/ofGLRenderer.h:4:
In file included from ../../../libs/openFrameworks/graphics/of3dGraphics.h:12:
In file included from ../../../libs/openFrameworks/3d/of3dPrimitives.h:3:
../../../libs/openFrameworks/3d/ofMesh.h:708:7: note: 'ofMeshFace' declared here
using ofMeshFace = ofMeshFace_<ofDefaultVertexType, ofDefaultNormalType, ofDefaultColorType, ofDefaultTexCoordType>;
      ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13970:96: error: use of undeclared identifier 'ofMeshData'
static int _wrap_MeshData_getNormalsData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                                               ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13970:108: error: expected expression
static int _wrap_MeshData_getNormalsData(lua_State* L) { int SWIG_arg = 0; ofMeshData *arg1 = (ofMeshData *) 0 ;
                                                                                                           ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13971:21: error: use of undeclared identifier 'ofArrayView'
  SwigValueWrapper< ofArrayView< void > > result; SWIG_check_num_args("ofMeshData::getNormalsData",1,1)
                    ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13971:39: error: expected '(' for function-style cast or type construction
  SwigValueWrapper< ofArrayView< void > > result; SWIG_check_num_args("ofMeshData::getNormalsData",1,1)
                                 ~~~~ ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13974:74: error: use of undeclared identifier 'result'
    SWIG_fail_ptr("MeshData_getNormalsData",1,SWIGTYPE_p_ofMeshData); }  result = ((ofMeshData const *)arg1)->getNormalsData();
                                                                         ^
/Users/cuinjune/Zack/openFrameworks/of_v0.10.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:13974:85: error: use of undeclared identifier 'ofMeshData'
    SWIG_fail_ptr("MeshData_getNormalsData",1,SWIGTYPE_p_ofMeshData); }  result = ((ofMeshData const *)arg1)->getNormalsData();
                                                                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated. 

I'm using Xcode 9.2 on macOS High Sierra 10.13.3.
Am I missing something? Any advice or guidance would be greatly appreciated.

build errors

hi I got this with the 'example'

  • addons/ofxLua/src/bindings/App.cpp:41:23: Use of undeclared identifier 'ofSleepMillis'
  • addons/ofxLua/src/bindings/3d.cpp:338:42: Address of overloaded function 'draw' does not match required type 'void ()'
  • addons/ofxLua/src/bindings/3d.cpp:399:54: Address of overloaded function 'draw' does not match required type 'void (ofPolyRenderMode)'

Thanks
Tasos

Cannot include "glm/gtc/functions.hpp" in OF 0.11.0

When I build ofxLua, (in Raspbian Buster) it fails saying the glmBindings.cpp file cannot include the file glm/gtc/functions.hpp.

It seems like the file no longer exists in OF 0.11.0. So I just commented out #include <glm/gtc/functions.hpp> in glmBindings.cpp, and then it builds fine.

are sound player classes/function inside?

this is something ive not got to work, have tried different ways. but on try a sound player then simple playing doesnt work.
thanks

main.lua

sound = of.SoundPlayer
-- also tried this: sound = of.soundPlayer
function setup()
    sound:loadSound('sound/beat.wav')
end

function draw()
    sound:play()
end

issue in ubuntu 12.04 64bit

i get this errors trying to build your example:
-------------- Build: Debug in ofxLuaExample ---------------

Using makefile: Makefile
compiling x86_64 object for: src/AppCore.cpp
In file included from ../../../addons/ofxLua/src/luabind/luabind/wrapper_base.hpp:31:0,
from ../../../addons/ofxLua/src/luabind/luabind/back_reference.hpp:27,
from ../../../addons/ofxLua/src/luabind/luabind/class.hpp:93,
from ../../../addons/ofxLua/src/luabind/luabind/luabind.hpp:28,
from ../../../addons/ofxLua/src/ofxLua.h:36,
from src/AppCore.h:15,
from src/AppCore.cpp:11:
../../../addons/ofxLua/src/luabind/luabind/detail/call_member.hpp:377:1: error: missing binary operator before token "("
In file included from ../../../addons/ofxLua/src/luabind/luabind/back_reference.hpp:27:0,
from ../../../addons/ofxLua/src/luabind/luabind/class.hpp:93,
from ../../../addons/ofxLua/src/luabind/luabind/luabind.hpp:28,
from ../../../addons/ofxLua/src/ofxLua.h:36,
from src/AppCore.h:15,
from src/AppCore.cpp:11:
../../../addons/ofxLua/src/luabind/luabind/wrapper_base.hpp:136:1: error: missing binary operator before token "("
In file included from ../../../addons/ofxLua/src/luabind/luabind/function.hpp:10:0,
from ../../../addons/ofxLua/src/luabind/luabind/class.hpp:94,
from ../../../addons/ofxLua/src/luabind/luabind/luabind.hpp:28,
from ../../../addons/ofxLua/src/ofxLua.h:36,
from src/AppCore.h:15,
from src/AppCore.cpp:11:
../../../addons/ofxLua/src/luabind/luabind/detail/call_function.hpp:422:1: error: missing binary operator before token "("
In file included from ../../../addons/ofxLua/src/luabind/luabind/detail/constructor.hpp:12:0,
from ../../../addons/ofxLua/src/luabind/luabind/class.hpp:96,
from ../../../addons/ofxLua/src/luabind/luabind/luabind.hpp:28,
from ../../../addons/ofxLua/src/ofxLua.h:36,
from src/AppCore.h:15,
from src/AppCore.cpp:11:
../../../addons/ofxLua/src/luabind/luabind/wrapper_base.hpp:136:1: error: missing binary operator before token "("
In file included from ../../../addons/ofxLua/src/luabind/luabind/class.hpp:105:0,
from ../../../addons/ofxLua/src/luabind/luabind/luabind.hpp:28,
from ../../../addons/ofxLua/src/ofxLua.h:36,
from src/AppCore.h:15,
from src/AppCore.cpp:11:
../../../addons/ofxLua/src/luabind/luabind/detail/call_member.hpp:377:1: error: missing binary operator before token "("
src/AppCore.cpp: In member function ‘void AppCore::nextScript()’:
src/AppCore.cpp:137:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp: In member function ‘void AppCore::runTests()’:
src/AppCore.cpp:172:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:180:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:188:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:199:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:235:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:265:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
src/AppCore.cpp:272:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make: *** [obj/x86_64Debug/src/AppCore.o] Errore 1
Process terminated with status 2 (0 minutes, 13 seconds)
5 errors, 8 warnings

what we can do?
Thanks

Errors on swig on rpi

@danomatika i'm running a rpi 1 with OF0.9.8 and trying to use your addon. but the compiler is failing with this message. looks like an error in the binds (partial output of the errors below). Also, the LuaJit is failing to link, the pkg is not finding it, besides all paths are in the correct place:

/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'void swig_delete_Mesh(void*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:12171:8: warning: deleting object of polymorphic class type 'ofMesh' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
 delete arg1;
        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_CylinderPrimitive_getTopCapIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13373:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofCylinderPrimitive const *)arg1)->getTopCapIndices(); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13373:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13374:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13374:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_CylinderPrimitive_getCylinderIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13392:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofCylinderPrimitive const *)arg1)->getCylinderIndices(); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13392:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13393:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13393:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_CylinderPrimitive_getBottomCapIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13411:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofCylinderPrimitive const *)arg1)->getBottomCapIndices(); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13411:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13412:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13412:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_ConePrimitive_getConeIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13758:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofConePrimitive const *)arg1)->getConeIndices(); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13758:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13759:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13759:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_ConePrimitive_getCapIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13775:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofConePrimitive const *)arg1)->getCapIndices(); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13775:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13776:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:13776:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp: In function 'int _wrap_BoxPrimitive_getSideIndices(lua_State*)':
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:14046:10: error: no match for 'operator=' (operand types are 'SwigValueWrapper<std::vector<unsigned int> >' and 'std::vector<short unsigned int>')
   result = ((ofBoxPrimitive const *)arg1)->getSideIndices(arg2); {
          ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:14046:10: note: candidates are:
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const SwigValueWrapper<T>&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:29:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const SwigValueWrapper<std::vector<unsigned int> >&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note: SwigValueWrapper<T>& SwigValueWrapper<T>::operator=(const T&) [with T = std::vector<unsigned int>]
   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
                     ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:33:21: note:   no known conversion for argument 1 from 'std::vector<short unsigned int>' to 'const std::vector<unsigned int>&'
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:14047:114: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                  ^
/media/Data/home/pi/of/098/addons/ofxLua/src/bindings/linuxarm/ofxLuaBindings.cpp:14047:120: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     std::vector< ofIndexType > * resultptr = new std::vector< ofIndexType >((const std::vector< ofIndexType > &) result);
                                                                                                                        ^
/media/Data/home/pi/of/098/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:336: recipe for target '/media/Data/home/pi/of/098/addons/obj/linuxarmv6l/Release/ofxLua/src/bindings/linuxarm/ofxLuaBindings.o' failed
make[1]: *** [/media/Data/home/pi/of/098/addons/obj/linuxarmv6l/Release/ofxLua/src/bindings/linuxarm/ofxLuaBindings.o] Error 1
make[1]: Leaving directory '/media/Data/home/pi/of/098/apps/myApps/TestingOfxLua' 

Problem during linking with luaExample

I have a linker problem using the given example in the repo :

Undefined symbols for architecture x86_64:
  "of::priv::setWorkingDirectoryToDefault()", referenced from:
      _wrap_setWorkingDirectoryToDefault(lua_State*) in ofxLuaBindings.o
  "_glutDragEventFunc", referenced from:
      ofAppGlutWindow::setup(ofGLWindowSettings const&) in libopenFrameworks.a(ofAppGlutWindow.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/luaExample] Error 1
make: *** [Release] Error 2

Is there any library I need to add somewhere during linking ?

Conversion problem file lstrlib.c

I found another small issue, on line number 936 of the file "stdlib.c", it's located inside the "Lua" folder. It belongs to Lua source itself, I've looked at the file's header, and the author's name is Roberto and it was created at 05/20/2016. Searching the internet, I've found this: http://lua-users.org/lists/lua-l/2016-06/msg00387.html

The issue itself it's just a conversion problem inside the method witch signature is "static void checkdp (char *buff, int nb)", it's a C++ problem, I don't know if GNU G++, or a non VS C++ compiler will have the same problem. I will investigate more, but no guarantees to find something.

Change v.vec2() to v:vec2() in README.md

Hi, I just found one thing to be fixed in README.md

-- convert
of.drawRectangle(v.vec2(), 20, 20) -- ofVec2f -> glm::vec2

I think v.vec2() should be v:vec2().

Thank you.

Problem while running the example (15/01/2014)

Hi Dan,
I have problem to run the example. I am on

  • MacBook Pro 2.4 GHz Intel Core 2 Duo
  • Mac OS X 10.8.5
  • of_v0.8.0_osx_release
  • your ofxLua last update from github
  • XCode 3.2.6 (I also try v.5.0.2)

I am taking the error:
Command /Developer/usr/bin/g++-4.2 failed with exit code 1

I haven't problem with the previous version. Any thoughts about why that happens?
I am developing a IDE for ofxLua in Emacs with yasnippet na osc.el package. Is it possible to include ofxOsc addon bindings (maybe another issue)?

Thanks for sharing, you make amazing job
Aris Bezas

Using ofxAssimpModelLoader in ofxLua?

Hi, Is it possible to load .obj files using ofxLua?

I think ofxAssimpModelLoader can do this but it's not part of OF core, right?

In this case, should I wrap this addon using SWIG? (using the new module name ofx?)

Thanks in advance!

Semantic issue: ofxLuaBindings.cpp No viable overloaded '='

Hello! This is such a cool project, thanks for sharing it! 🙏

I'm following the README.md to install and run this addon but I'm bumping on an error.
My computer is a macbook, I run macOS Mojave Version 10.14.6 (18G87).
I have XCode Version 10.2.1 (10E1001) installed and openFrameworks Version 0.11.0.

Here's exactly what I'm doing:

Install the add on

$ cd of_v0.11.0_osx_release/addons
$ git clone git://github.com/danomatika/ofxLua.git
$ cd ofxLua
$ git checkout 1.3.0

Note: checking out '1.3.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d792bb7 updated changelog, bump to 1.3.0
$ git submodule init
Submodule 'swig' (https://github.com/danomatika/swig-openframeworks.git) registered for path 'swig'
$ git submodule update
Cloning into 'of_v0.11.0_osx_release/addons/ofxLua/swig'...
Submodule path 'swig': checked out 'e67c8ce805d8cb62d2560c47ed25d8f7c9582fb9'

Import project example

  1. Project generator
  2. Import addons/ofxLua folder
  3. Open on IDE
  4. Build

Error:

of_v0.11.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:46581:70: No viable overloaded '='
	of_v0.11.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:34:21: Candidate function not viable: no known conversion from 'Range<ofXmlAttributeIterator>' to 'const SwigValueWrapper<ofXml::Range<ofXmlIterator<pugi::xml_attribute_iterator> > >' for 1st argument
	of_v0.11.0_osx_release/addons/ofxLua/src/bindings/desktop/ofxLuaBindings.cpp:38:21: Candidate function not viable: no known conversion from 'Range<ofXmlAttributeIterator>' to 'const Range<ofXmlIterator<pugi::xml_attribute_iterator>>' for 1st argument

This error message is very cryptic to me, I'm also not very experienced with this.
Any ideas how could I fix this error?

error getting unique faces from 3D primitive

I'm working on some of the stuff in the OF 3D primitives example. Stuck on getting vector of triangles from a mesh. Running this:

local icoSphere = of.IcoSpherePrimitive()
local mesh = icoSphere:getMesh()
local triangles = mesh:getUniqueFaces()

I was expecting a wrapped vector to be returned. Instead I get error:

attempt to index local 'mesh' (a userdata value)

Is this expected? I'm a little new to lua so I don't know if I'm missing something...

Receive OSC messages inside lua script

Good evening,

I am trying to receive arguments from OSC messages inside lua script, for live coding use. I extend wrapper and is working very well, but something strange happen.
Here is a float function that I want to return the amplitude which I receive from an OSC msg.

float ofApp::amp() {
    return amplitude;
}

It's returning a 0 while amplitude is changing.
If I substitute amplitude with ofGetFrameNum() is working fine!

float ofApp::amp() {
    return ofGetFrameNum();
}

Any help?
Thanks in advance

Duplicate getFrameNum bind definition

After a conflict with of.getFrameNum() function I found that the getFrameNum has a duplicate bind definition at App.cpp:39 and Utils.cpp:268. Is it better for you to make a pull request?

New types int and double

Hi Dan,

thanks for ofxLua, it is making my Lua/openframeworks live a lot easier. And it would be even better if you could include get/set/is int and double functions. So getInt, setInt, isInt, etc.

Thanks in advance, and best regards, AlexP

class reflexion

hi all,

not sure if this is the right place for question about ofxLua, but here it goes!

I've been trying to do reflexion of class in c++, but with no success. Someone have told me to check lua and try to intregate it with c++/openframeworks. So may question is can i do that using ofxLua? is there any easy function to do that?

thanks in advance
jf

luajit-5.1 not found when compiling example on Raspberry Pi

Hello!
Thanks for your work on this - it's a great addon.

I'm having some difficulties building the luaExample on a Raspberry Pi 3 running Raspbian Jessie Lite. When building I get this reoccurring error:

Package luajit-5.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `luajit-5.1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'luajit-5.1' found

I'm pretty sure I have the required dependency installed:

libluajit-5.1-2 is already the newest version.
libluajit-5.1-common is already the newest version.
libluajit-5.1-dev is already the newest version.

but running sudo find / -name 'luajit-5.1.pc' returns nothing.

Any hints you could offer as to what to try next?

Seg fault during init on Pi3

Hi Dan,
after some more investigation I've found ofxLua is throwing a segfault when calling init() on a Pi.

The error is thrown at line 61: of ofxLua.cpp
luaopen_of(L);

Calling init(false, true, false) to avoid loading of_bindings inits ok. Another seg fault is thrown later in the program as it attempts to load a script (the imageLoaderExample script) but perhaps this is to be expected. In this case, the output before the fault looks like this:

[verbose] ofxLua: Doing script: "imageLoaderExample.lua" path: "/home/pi/openFrameworks/apps/myApps/luaExample/bin/data/scripts"
[verbose] ofxLua: Changing to script dir "/home/pi/openFrameworks/apps/myApps/luaExample/bin/data/scripts"
Segmentation fault

My setup function looks like this and runs without issue on osx:

void ofApp::setup() {
        ofSetVerticalSync(true);
        ofSetFrameRate(30);
        ofSetLogLevel("ofxLua", OF_LOG_VERBOSE);
        //lua.init(false, true, false);
        lua.init();
        lua.addListener(this);
        lua.doScript("scripts/imageLoaderExample.lua", true);
        lua.scriptSetup();
}

Thanks,
Bob.

setBoolVector() doesn't work properly

Hi @danomatika , Thanks for creating this amazing addon.
I think ofxLua::setBoolVector() doesn't work as expected.
Here's the simple test code.
You can simply copy & paste the below code into luaExample's setup();

//--------------------------------------------------------------
void ofApp::setup() {

    ofSetVerticalSync(true);
    ofSetFrameRate(30);
    ofSetLogLevel("ofxLua", OF_LOG_VERBOSE);
	
    // reinit the lua state, clears test data in state
    lua.init(true); // true because we want to stop on an error

    lua.doString("myTable = {false, true}\
                 function setup()\
                    if (myTable[1] == true) then\
                        print(\"TRUE\")\
                    else\
                        print(\"FALSE\")\
                    end\
                 end");
    
    lua.scriptSetup();
    vector<bool> vecToSet = {true, true};
    lua.setBoolVector("myTable", vecToSet);
    lua.scriptSetup();
    
    vector<bool> vecToGet;
    lua.getBoolVector("myTable", vecToGet);
    
    if (vecToGet.empty())
        cout << "empty" << endl;
    else
        cout << "not empty" << endl;
    ofExit();
}

And when I run this code I get the following result.

[verbose] ofxLua: Initialized state
FALSE
FALSE
empty
[verbose] ofxLua: Cleared state

But I think it should print as the following.

[verbose] ofxLua: Initialized state
FALSE
TRUE
not empty
[verbose] ofxLua: Cleared state

I think setting the table using ofxLua::setBoolVector somehow makes the table empty.
Any idea why this happens and how to fix this?

Wrong arguments for overloaded function 'drawBitmapString'

Hi,

Calling of.drawBitmapString("(a) star\nwinding rule odd", 20, 210) in lua scxript generates this error:

[notice ] got a script error: Error running draw(): ...mbing\of\apps\hec\cc\bin\data\scripts\polygonExample.lua:366: Wrong arguments for overloaded function 'drawBitmapString'
  Possible C/C++ prototypes are:
    ofDrawBitmapString(string const &,float,float)
    ofDrawBitmapString(string const &,ofPoint const &)
    ofDrawBitmapString(string const &,float,float,float)

ofDrawBitmapString exists in the code. Input file for Swig has also definition for it.

// DIFF: ofGraphics.h:
// DIFF:   ignoring foDrawBitmapString template functions in favor of
// DIFF:   string versions target languages can handle the string conversions
%ignore ofDrawBitmapString(const T &, const ofPoint&);
%ignore ofDrawBitmapString(const T &, float, float);
%ignore ofDrawBitmapString(const T &, float, float, float);

// manually define string functions here otherwise they get redefined by SWIG & then ignored
void ofDrawBitmapString(const string & textString, float x, float y);
void ofDrawBitmapString(const string & textString, const ofPoint & p);
void ofDrawBitmapString(const string & textString, float x, float y, float z);

Can you point me to the right solution? I have latest OF, refreshed binding via swig. Compiled under Visual Studio 2015.

[QUESTION] using classes

im just working with using classes. having a main.lua which deals in the main brunt of bringing all the other .lua files together, and then have my other game .lua files. but on trying this many different ways, it does not seem to be working. im guessing that using something like of.Image within a class is not allowed, but know this to be false.

here is my main.lua, then my playerClass.lua im making. could you just point out what is wrong. i have been through the lua stuff plus what you had said on the github page, but its just not working for me.
im just not seeing the problem sadly

thanks

main.lua

PlayerClass = require 'PlayerClass'

function setup()
    PlayerClass:setup()
end

function update()
    -- body
end

function draw()
    PlayerClass:draw()
end

PlayerClass.lua

PlayerClass = class()
image = of.Image()
function PlayerClass:setup()
    image:loadImage('sprite/player/Player.png')
end

function PlayerClass:update()
    -- body
end

function PlayerClass:draw()
    image:draw(0,0)
end

How to call OF functions that take pointer argument

There seem to be quite a few functions in OF that take pointer argument.

I could search these arguments by seaching if(!SWIG_isptrtype(L,2, if(!SWIG_isptrtype(L,3 and if(!SWIG_isptrtype(L,4 in ofBindings.cpp file.

For example, ofShader::setUniform1iv() function takes const int *v argument.

Are these functions currently not possible to use in ofxLua?

Will I be able to use them If I add typemaps in the SWIG interface(.i) file and regenerate the bindings? (So a table can be converted to const int *v for example)

How to use luajit on macOS?

Hi @danomatika
I'm currently trying to replace lua with luajit on macOS.
Here's how I tried to do it.

  1. Download LuaJIT-2.0.5 (current stable version)
  2. Build and install it using make && sudo make install
  3. Open a working luaExample project in Xcode.
  4. Remove files under addons/libs/lua in Xcode.
  5. Add path/to/LuaJIT-2.0.5/src to "Header Search Paths" in Xcode.
  6. Add path/to/LuaJIT-2.0.5/src to "Library Search Paths" in Xcode.
  7. Drag&drop path/to/LuaJIT-2.0.5/src/libluajit.a into the Xcode project.
  8. If I build it, I get the following 8 errors.
Undefined symbols for architecture x86_64:
  "_lua_rawlen", referenced from:
      _wrap_Arduino_sendString(lua_State*) in ofxLuaBindings.o
      _wrap_Arduino_connect__SWIG_1(lua_State*) in ofxLuaBindings.o
      _wrap_Arduino_connect__SWIG_0(lua_State*) in ofxLuaBindings.o
      _wrap_new_Directory__SWIG_1(lua_State*) in ofxLuaBindings.o
      _wrap_Directory_open(lua_State*) in ofxLuaBindings.o
      _wrap_Directory_allowExt(lua_State*) in ofxLuaBindings.o
      _wrap_Directory_copyTo__SWIG_2(lua_State*) in ofxLuaBindings.o
      ...
  "_lua_tonumberx", referenced from:
      _wrap_3dPrimitive_mapTexCoords(lua_State*) in ofxLuaBindings.o
      _wrap_3dPrimitive_drawAxes(lua_State*) in ofxLuaBindings.o
      _wrap_3dPrimitive_drawNormals__SWIG_1(lua_State*) in ofxLuaBindings.o
      _wrap_3dPrimitive_drawNormals__SWIG_0(lua_State*) in ofxLuaBindings.o
      _wrap_Arduino_sendDigitalPinMode(lua_State*) in ofxLuaBindings.o
      _wrap_Arduino_sendAnalogPinReporting(lua_State*) in ofxLuaBindings.o
      _wrap_Arduino_setDigitalHistoryLength(lua_State*) in ofxLuaBindings.o
      ...
  "_lua_pcallk", referenced from:
      ofxLua::doScript(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in ofxLua.o
      ofxLua::scriptSetup() in ofxLua.o
      SWIG_Lua_dostring(lua_State*, char const*) in ofxLuaBindings.o
  "_lua_rotate", referenced from:
      SWIG_Lua_get_class_metatable(lua_State*, char const*) in ofxLuaBindings.o
      SWIG_Lua_namespace_get(lua_State*) in ofxLuaBindings.o
      SWIG_Lua_class_do_get(lua_State*, swig_type_info*, int, int*) in ofxLuaBindings.o
      SWIG_Lua_class_do_get_item(lua_State*, swig_type_info*, int, int*) in ofxLuaBindings.o
      SWIG_Lua_iterate_bases(lua_State*, swig_type_info*, int, int (*)(lua_State*, swig_type_info*, int, int*), int*) in ofxLuaBindings.o
      SWIG_Lua_class_do_set(lua_State*, swig_type_info*, int, int*) in ofxLuaBindings.o
      SWIG_Lua_get_inheritable_metamethods(lua_State*) in ofxLuaBindings.o
      ...
  "_lua_copy", referenced from:
      _proxy__wrap_new_3dPrimitive(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Arduino(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_BoxPrimitive(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Buffer(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_BufferObject(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Camera(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_FloatColor(lua_State*) in ofxLuaBindings.o
      ...
  "_lua_getglobal", referenced from:
      ofxLua::scriptSetup() in ofxLua.o
      ofxLua::exists(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in ofxLua.o
  "_lua_callk", referenced from:
      _proxy__wrap_new_3dPrimitive(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Arduino(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_BoxPrimitive(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Buffer(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_BufferObject(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_Camera(lua_State*) in ofxLuaBindings.o
      _proxy__wrap_new_FloatColor(lua_State*) in ofxLuaBindings.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you know if I'm missing anything?
I'd appreciate if you could give me a hint to build the luaExample using luajit on macOS.
Thank you so much!

bad swig reference?

looks like the commit for swig just now is broken somehow?

10.0.1.7 ~/openFrameworks/addons/ofxLua $ git submodule update --recursive --init 
Submodule 'swig' (https://github.com/danomatika/swig-openframeworks.git) registered for path 'swig'
Cloning into '/home/we/openFrameworks/addons/ofxLua/swig'...
fatal: remote error: upload-pack: not our ref 04dec604976b20e8dcc6b5e0958bdd689966ffae
fatal: the remote end hung up unexpectedly
Fetched in submodule path 'swig', but it did not contain 04dec604976b20e8dcc6b5e0958bdd689966ffae. Direct fetching of that commit failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.