I need to include some cpp files into my haxe project, but I don't know how to tell the compiler where the directory is. I don't want to use absolute path. How can I include the directory with the cpp files?
@:include("LinearMath/btScalar.h")
@:native("::btTypedObject")
@:structAccess
@:unreflective
EDIT: Ok, i got it now.
If you want to use your own .hxcpp_config.xml, type in the console:
haxelib run hxcpp
A .hxcpp_config.xml will be created in the Users Directory (talking now about win 7).
<!-- Compiling on windows ... -->
<compiler id="MSVC" if="windows">
<!-- Example adding a build flag -->
<flag value = "-IC:/path/>
</compiler>
Different ways ... http://www.wighawag.com/blog/2014/12/Hxcpp-extern
Thank you, but I know CFFI and how to compile ndlls. The @:include macros are quite new I think. There is even a @:cppFileCode and a @:functionCode macro to directly insert header code and cpp code from a .hx file. I tested it including and I was able to call SetCursorPos Windows API function from the .hx file.
This is really cool stuff. Now I'm stuck because I don't know how to add include compiler flag to build process, e.g. -Ic:mycoolstuff/path.