Advertisement
Guest User

Untitled

a guest
Apr 26th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. mkdir -p ./.zbuild
  4.  
  5.  
  6. (
  7. cat <<'EOT'
  8. import luad.all;
  9. void main () {
  10. auto lua = new LuaState;
  11. lua.openLibs();
  12. lua.globals["message"] = "hello, world!";
  13. lua.doString(`print(message)`);
  14. auto print = lua.get!LuaFunction("print");
  15. print("Hello, world!");
  16. }
  17. EOT
  18. ) >hello.d
  19.  
  20.  
  21. gdc -s -o hello \
  22. luad/c/lauxlib.d \
  23. luad/c/lua.d \
  24. luad/c/luaconf.d \
  25. luad/c/lualib.d \
  26. luad/c/tostring.d \
  27. luad/c/all.d \
  28. luad/all.d \
  29. luad/base.d \
  30. luad/dynamic.d \
  31. luad/error.d \
  32. luad/lfunction.d \
  33. luad/lmodule.d \
  34. luad/stack.d \
  35. luad/state.d \
  36. luad/table.d \
  37. luad/conversions/arrays.d \
  38. luad/conversions/assocarrays.d \
  39. luad/conversions/classes.d \
  40. luad/conversions/functions.d \
  41. luad/conversions/structs.d \
  42. luad/conversions/variant.d \
  43. hello.d \
  44. -lm -ldl -llua5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement