losinggeneration

hxcpp

Apr 15th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. % cat Main.hx
  2. interface TestInterface {
  3. function fubar(s: String) : Void;
  4. }
  5.  
  6. class Test implements TestInterface {
  7. public function new() {}
  8. public function fubar(s: String) {
  9. trace(s);
  10. }
  11. }
  12.  
  13. class Main {
  14. static function main() {
  15. var test = new Test();
  16. test.fubar("Interface");
  17. }
  18. }
  19.  
  20. % haxe
  21. Haxe Compiler 3.0.0 - (C)2005-2013 Haxe Foundation
  22.  
  23. % haxelib list
  24. ...
  25. hxcpp: [3.0.0]
  26. ...
  27.  
  28. % haxe -main Main -cpp out
  29. haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3."
  30. <compiling>
  31.  
  32. % ./out/Main
  33. Main.hx:8: Interface
Advertisement
Add Comment
Please, Sign In to add comment