views:

263

answers:

1

Hello, I've been instructed to download and install FlashDevelop and it seems fine but I don't know how to generate exe files when writing programs in haXe. I try to Build or Run the project in FlashDevelop BUT it just doesn't do anything. Can anybody please advise me on how to do this?

Thank you

+1  A: 

The CPP target is the youngest in the haXe world and so still a little rough on the edges; add in more complexity because it depends on external tools to properly work.

Made that premise, try to create a new haXe/CPP project in FlashDevelop, open the Main class and add a simple trace("hello world!"); line. Hit F5 to start the "compile and run" process. You'll see in the status bar the message "Build started ..." and you can follow the process looking at the "Output Panel". If your environment is set correctly it will compile the whole project and open a DOS window where it will execute the generated executable (you can find it in the bin folder).

If you receive an error then your environment is not yet ready to build CPP applications with haXe. To fix that follow the setup instructions you can find here.

An easy alternative to produce native execubles (yes, you can compile the same for Win/Mac/Linux) you can target neko to produce a .n file and nekotools to transform it in the exe form. Just type:

nekotools boot main.n
Franco Ponticelli
Note that the first run of the compiler on a CPP project can take a lot of time. After that it will be a lot faster because many things are cached.
Franco Ponticelli
thank you so much @Franco your help is much appreciated :D
baeltazor
no problem at all ;)
Franco Ponticelli