haXe常见问题

  1. 安装:cl.exe找不到
    添加环境变量PATH: c:Program FilesMicrosoft Visual Studio 9.0VCinclude;c:Program FilesMicrosoft Visual Studio 9.0VClib;c:Program FilesMicrosoft Visual Studio 9.0VCbin;c:Program FilesMicrosoft Visual Studio 9.0Common7IDE;c:Program FilesMicrosoft SDKsWindowsv6.0ALib;
  2. C++编译:string.h找不到
    在c:Program FilesMicrosoft Visual Studio 9.0VC下创建 子目录,在当前目录下编译
  3. swhx: haxe.#Http has no field request
    Because request has been renamed requestUrl, according to haxe’s change log - making that name change in Plugin.hx to fix it.
  4. 运行app.n
    D:Adamhaxeswhx>”c:motion-twinhaxelibswhx1,2,0toolsswhx”
  5. swhx初始化黑屏的问题?
    A quick fix for this issue is to (in code) immediately maximize then unmaximize the window:
    window.visible = true;
    // enter the system event loop (will exit when window is closed)
    var old:Bool = window.maximized;
    window.maximized = false;
    window.maximized = true;
    window.maximized = old;
  6. Distributing a Screenweaver application?
    http://screenweaver.org/doku.php?id=tutorials:distribution
  7. hxcpp: Class not found : nme.Manager? class not found… etc?
    haxe stage can’t be accessed until init is called? Clear neash, neash is deprecated.Compile:
    -cp “C:Motion-Twinhaxelibhxcpp2,06,1include”
    -lib nme
    -lib hxcpp
    –remap flash:nme
    –remap neko:cpp
    -cpp cpp

    Main:
    import nme.Lib;
    import nme….

    public static function main() {
    #if flash
    new Main();
    #else
    Lib.create(function(){new Main();},320,480,60,0xccccff,(1*Lib.HARDWARE) | Lib.RESIZABLE);
    #end
    }

  8. install?

    Get haxe & neko: Visit haxe.org

    Get hxcpp: haxelib install hxcpp

    Get nme: haxelib install nme

  9. 常用命令
    neko run.n
    haxe compile.hxml
    haxelib list
    haxelib install feffect

    > For NME2, you can do a similar thing, and point the dev version at:
    >
    > haxelib dev nme “C:Developmenthaxenekonmeversion2”
    >
    > you will probably want to checkout the sdl-static libraries into your
    > c:Development path too, so the relative paths work.
    >
    > You will need to have an existing haxelib version of the code before you
    > can create a dev version.