Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mkdir -p ./.zbuild
- (
- cat <<'EOT'
- import luad.all;
- void main () {
- auto lua = new LuaState;
- lua.openLibs();
- lua.globals["message"] = "hello, world!";
- lua.doString(`print(message)`);
- auto print = lua.get!LuaFunction("print");
- print("Hello, world!");
- }
- EOT
- ) >hello.d
- gdc -s -o hello \
- luad/c/lauxlib.d \
- luad/c/lua.d \
- luad/c/luaconf.d \
- luad/c/lualib.d \
- luad/c/tostring.d \
- luad/c/all.d \
- luad/all.d \
- luad/base.d \
- luad/dynamic.d \
- luad/error.d \
- luad/lfunction.d \
- luad/lmodule.d \
- luad/stack.d \
- luad/state.d \
- luad/table.d \
- luad/conversions/arrays.d \
- luad/conversions/assocarrays.d \
- luad/conversions/classes.d \
- luad/conversions/functions.d \
- luad/conversions/structs.d \
- luad/conversions/variant.d \
- hello.d \
- -lm -ldl -llua5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement