What I got is *.a library and *.h header. I want to use them in my application. Haw can I link them with my project.
C code in my app is already done but I have no idea how to attach .a lib.
If you look in the cpp output folder there’s a file called Build.xml, that will contain your added flags. Hxcpp compiles source code by reading that file. It’s like a makefile and It’s a surprisingly decent cross-platform C++ build tool in its own right for something buried away in a haxe library!
haxe.exe generates the C++ code and that Build.xml ‘makefile’
hxcpp’s build tool is then called, reads that Build.xml file and runs native compiler commands
If you add -D HXCPP_VERBOSE, hxcpp will print all native commands as they’re executed. If you CD into the cpp output directory you can copy and paste those commands into a terminal and reproduce the build exactly (useful for debugging sometimes)
package src;
class Main {
public static function main() {
Sys.println("start");
}
}
It creates some cpp files in the bin/cpp, with haxe build.hxml
Can I move the main.h and main.cpp created and place it in my src folders containing my haxe code…
Then place @:buildXml(something) attribute on the moved main.cpp in src. Now I can change these files and they will compile with cpp target?