When I try to compile my project, Haxe gives a single line of output:
> haxe build.hxml
MyClass.hx:3: character 1 : Invalid build parameters
The line number points to a class in my code that looks fine...
class MyClass implements MyInterface {
What is the problem? Google has no hits for this error message.
Explanation:
While the compiler error message confusingly points to the
MyClass.hxfile, the error is referring to the@:autoBuildspecification (docs), which is on the interface definition. There is likely a syntax error with this specification.An example of correct syntax for this metadata is:
This assumes that the
MyMacroclass is in thepkgpackage and has the specified build macro of this form:Read more about build macros here.
Possible Syntax Errors:
There are a few potential problems that may cause Invalid build parameters:
()at the end.)@:autoBuild( )(including optional function arguments) so check for mismatched parentheses.