I was trying to set up Haxe, but this error faces me whenever I try to import a Library, whether it be js.Lib
, cpp.Lib
, etc. It always comes up with this error:
Error: You cannot access the cpp package while targeting cross (for cpp.Lib)
I've been searching for hours now, with nobody seeming to get the same problem and no fixes. Please help!
"cross" means that the compiler is being invoked without any target (-cpp
, -js
...) specified.
I'm not sure which one you selected, but if I remember correctly, the project setup with some of HaxeDevelop's templates is a bit unusual. Normally you would use a HXML file where you can specify the arguments directly. A build.hxml
that looks like this should work here:
-cp src
-main Main
-cpp bin
Then just run haxe build.hxml
.