Creative Commons License krshock: insanidad garantizada por krshock está licenciado según la Creative Commons Atribución-No Comercial-Sin Derivadas 2.0 Chile License. excepto en los casos que se declare explícitamente otra licencia o autor.





Chileno, Talquino, Santiaguino y Talquino.

sábado, julio 06, 2013

HaXe crashcourse, Day One: Invalid DCE mode FIX

Today when i tried to build a fresh empty Haxe NME project in FlashDevelop, the next error happened:

Building Test001
haxelib run nme build C:\Users\kr\Documents\Test001\application.nmml flash

Error: : Invalid DCE mode, expected std | full | no.
Haxe Compiler 3.0.0 - (C)2005-2013 Haxe Foundation
 Usage : haxe.exe -main <class> [-swf|-js|-neko|-php|-cpp|-as3] <output> [options]
 Options :
  -cp <path> : add a directory to find source files
  -js <file> : compile code to JavaScript file
  -swf <file> : compile code to Flash SWF file
  -as3 <directory> : generate AS3 code into target directory
  -neko <file> : compile code to Neko Binary
  -php <directory> : generate PHP code into target directory
  -cpp <directory> : generate C++ code into target directory
  -cs <directory> : generate C# code into target directory
  -java <directory> : generate Java code into target directory
  -xml <file> : generate XML types description
  -main <class> : select startup class
  -lib <library[:version]> : use a haxelib library
  -D <var> : define a conditional compilation flag
  -v : turn on verbose mode
  -debug : add debug information to the compiled code
  -dce [std|full|no] : set the dead code elimination mode
  -swf-version <version> : change the SWF version (6 to 10)
  -swf-header <header> : define SWF header (width:height:fps:color)
  -swf-lib <file> : add the SWF library to the compiled SWF
  -swf-lib-extern <file> : use the SWF library for type checking
  -java-lib <file> : add an external JAR or class directory library
  -x <file> : shortcut for compiling and executing a neko file
  -resource <file>[@name] : add a named resource file
  -prompt : prompt on error
  -cmd : run the specified command after successful compilation
  --flash-strict : more type strict flash API
  --no-traces : don't compile trace calls in the program
  --gen-hx-classes : generate hx headers for all input classes
  --next : separate several haxe compilations
  --display : display code tips
  --no-output : compiles but does not generate any file
  --times : measure compilation times
  --no-inline : disable inlining
  --no-opt : disable code optimizations
  --php-front <filename> : select the name for the php front file
  --php-lib <filename> : select the name for the php lib folder
  --php-prefix <name> : prefix all classes with given name
  --remap <package:target> : remap a package to another one
  --interp : interpret the program using internal macro system
  --macro  : call the given macro before typing anything else
  --wait <[host:]port> : wait on the given port for commands to run)
  --connect <[host:]port> : connect on the given port and run commands there)
  --cwd <dir> : set current working directory
  -version : print version and exit
  --help-defines : print help for all compiler specific defines
  --help-metas : print help for all compiler metadatas
  -help  Display this list of options
  --help  Display this list of options

Build halted with errors (haxelib.exe).
Done(1)
The solution is very straightforward: Disable the DCE compiler flag for haxe3 makes the build work again in FlashDevelop, and all that you need to do is delete the line "-dce" from the "Compiler options" list located in Menu>Project>Properties>Compiler Options Tab>Additional Compiler Option>[...]