Horje
how to interface c++ in haxe Code Example
how to interface c++ in haxe
Im not exactly sure how this works but it do....
  
 Haxe file:


@:include("helloWorld.cpp")

@:native("cppClass") 
extern class CppClass {
    @:native("cppClass::helloFromCpp") static public function helloFromCpp():Void;
}



class Main {
    static public function main() {
        CppClass.helloFromCpp();
    }
}




CPP file ( called helloWorld.cpp):
#include <iostream>
class Geeks 
{ 
    public: 
 		static helloFromCpp(){
         std::cout << "hello from cpp!"; 
        }
      
}




Cpp

Related
xmake run with arg Code Example xmake run with arg Code Example
qt rotate qimage Code Example qt rotate qimage Code Example
print linkedstack cpp Code Example print linkedstack cpp Code Example
cannot find -lsqlite3 C++ compiler error Code Example cannot find -lsqlite3 C++ compiler error Code Example
c++ sleep Code Example c++ sleep Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10