Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % cat Main.hx
- interface TestInterface {
- function fubar(s: String) : Void;
- }
- class Test implements TestInterface {
- public function new() {}
- public function fubar(s: String) {
- trace(s);
- }
- }
- class Main {
- static function main() {
- var test = new Test();
- test.fubar("Interface");
- }
- }
- % haxe
- Haxe Compiler 3.0.0 - (C)2005-2013 Haxe Foundation
- % haxelib list
- ...
- hxcpp: [3.0.0]
- ...
- % haxe -main Main -cpp out
- haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3."
- <compiling>
- % ./out/Main
- Main.hx:8: Interface
Advertisement
Add Comment
Please, Sign In to add comment