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!";
}
}