Extern classes annotated with cpp.PointerType cannot have constructors, adding a constructor to these classes will generate this error.
The following example generates CPP0004.
@:semantics(value) @:cpp.PointerType extern class Foo { function new():Void; // CPP0004 } function main() { final f = new Foo(); }