Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haxe Error: You cannot access the cpp package while targeting cross (for cpp.Lib)

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)

Screenshot

I've been searching for hours now, with nobody seeming to get the same problem and no fixes. Please help!

like image 410
SeaPeaMe Avatar asked Sep 15 '26 17:09

SeaPeaMe


1 Answers

"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.

like image 76
Gama11 Avatar answered Sep 18 '26 06:09

Gama11



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!