[Derelict-Lua] compiler error when lua_register is called

Jack via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 2 07:23:55 PDT 2016


So basically I get the error "function button(lua_State* L) is 
not callable using argument types ()" whenever I try to 
lua_register a function.
```
lua_register(L,"button",button);
```
but whenever I use the function pointer I get the error 
"lua_register is not callable using argument types (lua_State*, 
char*,extern (C) int function(lua_State* L)"
```
lua_register(L,"button",&button);
```

Is this a bug, or am I doing something wrong here?




More information about the Digitalmars-d-learn mailing list