简体   繁体   English

如何在ios模拟器中运行openfl

[英]How do I get openfl running in the ios simulator

I have the latest version of Haxe 3 installed along with the latest version of Xcode and OpenFL. 我安装了最新版本的Haxe 3以及最新版本的Xcode和OpenFL。

I'm inside my OpenFl project in the terminal and I run the following command: 我在终端的OpenFl项目中,运行以下命令:

openfl test ios -simulator

I get the following error: 我收到以下错误:

/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

It's choking on the word "by", which would be from the "Generated by Haxe" inserted at the top of generated C++ source files. 它正在扼杀“by”这个词,它来自生成的C ++源文件顶部的“生成的Haxe”。

So try haxelib run openfl build ios -simulator -Dsource-header=haxe (or the hxcpp equivalent) to replace the default header with "haxe", it should work without the spaces in the header line. 所以试试haxelib run openfl build ios -simulator -Dsource-header=haxe (或hxcpp等价物)用“haxe”替换默认标题,它应该没有标题行中的空格。

Check this OpenFL issue, seems like the same problem: https://github.com/openfl/openfl/issues/1132 检查这个OpenFL问题,看起来像是同样的问题: https//github.com/openfl/openfl/issues/1132

Afterward you might hit this issue too: https://github.com/openfl/openfl/issues/1153 之后你也可能遇到这个问题: https//github.com/openfl/openfl/issues/1153

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM