1

我无法让从 Haxe 源代码编译的可执行文件在未安装 Haxe 的计算机上运行。问题首先出现在一个简单的网络程序上,但似乎任何程序都会出现。甚至像

class Test
{
    static function main()
    {
        trace("test");
    }
}

编译为 exehaxe -main Test.hx -neko Test.n并将nekotools boot Test.n在我的计算机上运行,​​但在其他任何东西上都会neko.dll is missing from your computer出错。如果我将 haxe 源编译为 c++ 或 c# 并运行生成的 exe,我会收到类似的错误。

我不确定 neko.dll 是什么,但我不知道它应该如何运行 exe。我觉得我一定有一些基本的误解!这是预期的行为吗?如何编译 Haxe 代码,以便它可以在任何 Windows 机器上运行而无需安装 neko?

4

1 回答 1

0

neko.dll is normally located at C:\HaxeToolkit\neko. You may just copy and paste that next to the exe.

Generally when distributing a exe, you have to also distribute the required dlls. You can check the dll dependency with various tools. For example, using Dependency Walker, open the exe by it and it will list out the dlls. Right click a dll item in its menu and select properties, there you will find where it locates.

于 2015-01-18T12:12:44.753 回答