如何在 ios 模拟器中获取 openfl 运行

How do I get openfl running in the ios simulator

我安装了最新版本的 Haxe 3 以及最新版本的 Xcode 和 OpenFL。

我在终端的 OpenFl 项目中 运行 以下命令:

openfl test ios -simulator

我收到以下错误:

/Applications/Xcode.app/Contents/Developer/usr/bin/make
Haxe device build: Release-iphoneos-v7
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/Release-iphoneos-v7
cd build/Release-iphoneos-v7; export HXCPP_NO_COLOR=1; haxelib run hxcpp Build.xml -Dios -Diphone -DHXCPP_ARMV7 -DHXCPP_CPP11  -DHXCPP_CLANG -DOBJC_ARC `cat Options.txt | while read LINE; do printf " -D$LINE"; done`
Error: Could not find build target "by"
make: *** [build-haxe-armv7] Error 1
Command /Applications/Xcode.app/Contents/Developer/usr/bin/make failed with exit code 2

"by" 这个词令人窒息,它来自插入在生成的 C++ 源文件顶部的 "Generated by Haxe"。

所以尝试 haxelib run openfl build ios -simulator -Dsource-header=haxe(或 hxcpp 等价物)将默认的 header 替换为 "haxe",它应该可以在 [=25= 中没有空格的情况下工作]行。

检查这个 OpenFL 问题,似乎是同样的问题:https://github.com/openfl/openfl/issues/1132

之后你可能也会遇到这个问题:https://github.com/openfl/openfl/issues/1153