Closed hiz1 closed 6 years ago
Are you sure the lua sources are being built with the addon? It seems like the headers are found but the linker can't find the implementation.
Thanks for reply. I checked obj/Debug folder, all lua obj files and ofxLua.obj, ofxLuaBindings.obj, ofxLuaFileWriter.obj, main.obj, ofApp.obj are found. I wonder why linker can't find lua implementation. Umm...
I finally got it with a non smart way.
I deleted all files in ofxLua/libs folder, made lua5.3.0-static.lib from lua sources(An Japanese article helps me).
and put it in ofxLua/libs folder, and put lauxlib.h, lua.h, lua.hpp, luaconf.h, lualib.h in ofxLua/src, and added below line to ofxlua.h.
#pragma comment(lib,"../libs/lua5.3.0-static.lib")
Now I can run the ofxLua example. Thanks.
Let's keep this open as it should work, although I've not tested in Visual Studio personally.
Dan Wilcox danomatika.com robotcowboy.com
On Dec 24, 2017, at 11:43 AM, hiz notifications@github.com wrote:
Closed #44.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
In such situation check if Visual Studio is compiling code as C, not as C++. You can look at symbols in object files. I had same problem a few days ago. Force Lua files to be compiled as C, ofx projects are C++.
That makes sense. There should be a way to specify this in the addon_config.mk file.
Dan Wilcox danomatika.com robotcowboy.com
On Mar 15, 2018, at 9:13 AM, Marcin Klimek notifications@github.com wrote:
In such situation check if Visual Studio is compiling code as C, not as C++. You can look at symbols in object files. I had same problem a few days ago. Force Lua files to be compiled as C, ofx projects are C++.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
Also, what are the steps to change the compile type for a file in VS? My windows install was hosed and I haven't reinstalled yet.
Dan Wilcox danomatika.com robotcowboy.com
On Mar 15, 2018, at 9:13 AM, Marcin Klimek notifications@github.com wrote:
In such situation check if Visual Studio is compiling code as C, not as C++. You can look at symbols in object files. I had same problem a few days ago. Force Lua files to be compiled as C, ofx projects are C++.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
On Solution Explorer:
Thanks. I added this info to the readme for now.
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.