-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I'm rather new to D so maybe I'm simply missing some fundamentals, but how do I add a C function to the stack?
My code:
import raylib;
import bindbc.lua;
extern(C) static int hello(lua_State *L) {
DrawText("Hello, LUA!", 960, 300, 28, Colors.BLACK);
return 1;
}
extern(C) void main()
{
LuaSupport ret = loadLua();
lua_State* mystate = luaL_newstate();
luaL_openlibs(mystate);
lua_pushcfunction(mystate, &hello);
}This fails with cannot pass argument `& hello` of type `extern (C) int function(lua_State* L)` to parameter `extern (C) int function(lua_State*) nothrow f`
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed