【发布时间】:2013-09-27 17:54:20
【问题描述】:
当尝试使用 Lua 通道从 Lua 模块调用 C 函数时,控件不会转移到“C”函数。 Lua 通道不能以线程方式与外部 C dll 一起工作有什么问题吗?
下面是代码sn-p
Lua 片段:
lanes.gen("*",func)
thread = func()
thread:join()
function func()
foo() -- expected to print "Hello world", by
-- calling below C function,but not happening
end
C sn-p 用VS-2012编译成dll:
static int foo(lua_state *L)
{
printf("Hello world\n")
}
【问题讨论】: