You should use the command "--next" to specify the next compile target. So:
-main Main
-java java
--next
-main Main
-cpp cpp
--next
-flash out.swf
Question
Here's the basic Haxe "Hello World!" program:
class Main
{
public static function main()
{
trace("Hello world");
}
}
Here's the build file for the above program:
-main Main
-java java
Now I want to compile this program to Java, Javascript, and C++ with a single .hxml file. How should the .hxml file be formatted, in this case?
Solution
You should use the command "--next" to specify the next compile target. So:
-main Main
-java java
--next
-main Main
-cpp cpp
--next
-flash out.swf
OTHER TIPS
I have written a compile.hxml
file that compiles the class Test.hx
to various target languages. All the necessary libraries will need to be installed first in order for it to work properly.
-js test.js
-main Test
--next
-php www
-main Test
--next
-cpp cpp
-debug
-main Test
--next
-main Test
-java java
--next
-cs test
-main Test
-D haxe3