Rastar Posted January 11, 2015 Share Posted January 11, 2015 I am trying to bind a custom C++ class to Lua - for the first time, so I'm probably doing something wrong... I have a simple test class #pragma once class ABC { public: ABC(); }; and its binding file (luacommands.pkg) $#include "ABC.h" class ABC { ABC(); }; I run the processor from here http://www.leadwerks.com/werkspace/files/file/216-tolua/ with the command tolua++.exe" -o gluecode.cpp luacommands.pkg then include the gluecode.cpp in my build (which compiles). But if I now start the game, I get an access violation right away (even though the class isn't used anywhere). First-chance exception at 0x5150C332 (lua51.dll) in TestGame.debug.exe: 0xC0000005: Access violation reading location 0x0000001C. What am I doing wrong? Or is this not working in the beta build? EDIT: This only happens if I add the Bloom shader (which is also Lua-based) to the camera. So I guess its Lua binding somehow interferes with mine. However, I want to use my class binding in a postprocessing step, so I need a way around this issue. EDIT2: Nope, this happens if I add any Lua script to an entity in the scene. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.