As listed here I’ve been attempting to inject inline c++.
@:functionCode and @:functionTailCode appear to work fine.
Unfortunately I can’t find any way of inserting code in to the head of files.
@:headerCode and @:cppFileCode both appear to be non-functional with the current version of haxe and hxcpp (examining the generated C++ files shows nothing added).
Is there an alternative way of injecting C++ in to the head of files? is this a bug or was it deliberately removed?
@:headerCode and @cppFileCode only work when used directly above class definitions. Not enums, typedefs or anything else; as each class is obviously compiled to a separate file. Putting them anywhere else in the file they will be silently ignored because they are class macros.