How do I get openfl running in the ios simulator
Asked Answered
C

1

6

I have the latest version of Haxe 3 installed along with the latest version of Xcode and OpenFL.

I'm inside my OpenFl project in the terminal and I run the following command:

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
Corneliacornelian answered 1/10, 2016 at 21:22 Comment(0)
M
5

It's choking on the word "by", which would be from the "Generated by Haxe" inserted at the top of generated C++ source files.

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.

Check this OpenFL issue, seems like the same problem: https://github.com/openfl/openfl/issues/1132

Afterward you might hit this issue too: https://github.com/openfl/openfl/issues/1153

Muir answered 1/10, 2016 at 23:9 Comment(1)
The second link you suggested that I look at, issue 1153 was super helpful. Hope they get a real solution in place soon.Corneliacornelian

© 2022 - 2024 — McMap. All rights reserved.