Created
December 29, 2015 03:42
-
-
Save yihuang/cac3e28cbf103c40c151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "LuaIntf/LuaIntf.h" | |
| extern "C" { | |
| #include "lua.h" | |
| } | |
| using namespace LuaIntf; | |
| void open(lua_State* L) { | |
| LuaBinding(L) | |
| .addConstant("GL_ES_VERSION_2_0", 1) | |
| ; | |
| } | |
| int main() { | |
| lua_State* L = luaL_newstate(); | |
| open(L); | |
| } | |
| /** | |
| * $ clang++ -std=c++11 test.cpp -llua -g2 | |
| * /a.out | |
| * PANIC: unprotected error in call to Lua API (bad argument #-1 (table expected, got nil)) | |
| **/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment