llgo/c/lua
This commit is contained in:
17
c/lua/_demo/hello/hello.go
Normal file
17
c/lua/_demo/hello/hello.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "unsafe"
|
||||
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/lua"
|
||||
)
|
||||
|
||||
func main() {
|
||||
L := lua.NewState()
|
||||
defer L.Close()
|
||||
L.OpenLibs()
|
||||
if res := L.Dostring(c.Str("print('hello world')")); res != lua.OK {
|
||||
println("error")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user