I’m using FlashDevelop 5.0.0.2 as my IDE and whenever I create a new OpenFL project an error message in red is displayed in the output panel - Error: “project.xml” is an unknown target. I’ve pasted the entire message into Google, but so far I haven’t found anything that helps me resolve the issue.
Even though I get the unknown target error I am able to build a windows .exe, but when I do I see a lot of filenames ending in .CPP scrolling by and the process seems to take longer than I expect it to, but perhaps that is just how it is? At the commandline I have used the following haxelib upgrade all to check the following:
This usually happens to me when FlashDevelop starts up initially. Adding a character and then deleting it (prompting another refresh) seems to fix it for me. As for the CPP compilation, it really does take a long time during the initial compilation. For the succeeding builds, hxcpp will only compile the files that have changed.
I’m working my way through the Pong tutorial over on HaxeCoder.com at the moment and so far I haven’t run into any problems as such. The ompilation is a LOT faster after the initial compile is done alright. The syntax is a little strange to me in places as I am used to C#.
Damn it…spoke too soon, I just added the following function to my Pong code and the error it was giving me was Missing return cpp.Void, I removed the :Void bit and it compiled OK, but now I’m not sure how to proceed. Link to the tutorial I’m working through - HaxeCoder.com Pong Tutorial
The function doesn’t return anything so what is the problem? Is the tutorial out of date and not fully compatible with a newer version of the language? I’m probably overlooking something.
Removing the cpp.Void import solved the problem, flash develop had added it automaticaly when I wrote the function and I hadn’t spotted it. What is the conflict between between what is defined in the import and my function?
This, apparently. Maybe “void” in C++ is different from “Void” in Haxe, and this gives you a way to choose between them? Still not sure how you’d use it or why you’d want to.
Personally, I’d suggest adding @:noCompletion in front of the declaration. That way, FlashDevelop will be less likely to import it.
Once you import cpp.Void, you can’t access Void anymore. The compiler always assumes that you’re talking about the one you imported.
In other words, Void is now “in the shadow of” cpp.Void.