Godot: IOS build error(entry point (_main) undefined. for architecture i386)

Created on 10 Oct 2018  ·  5Comments  ·  Source: godotengine/godot

Godot version:
3.1 alpha

OS/device including version:
macOS 10.13.5
Xcode 9.4.1

Issue description:
Unable to run in simulator
https://github.com/godotengine/godot/issues/18359#issue-316591926
Unable to solve
Please help me!
using Godot to develop IOS is very difficult.

Ld /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/Objects-normal/i386/testGodot normal i386
    cd /Users/domen/Desktop/testIOS
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -L/Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Products/Debug-iphonesimulator -F/Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Products/Debug-iphonesimulator -FtestGodot -filelist /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/Objects-normal/i386/testGodot.LinkFileList -mios-simulator-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/Objects-normal/i386/testGodot_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib=libc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/testGodot.app-Simulated.xcent -framework CoreGraphics -framework SystemConfiguration -framework Security -framework QuartzCore -framework MediaPlayer -framework GameController -framework CoreMotion -framework CoreMedia -framework CoreAudio -framework AudioToolbox -framework OpenGLES -framework StoreKit -framework AVFoundation -framework UIKit -framework GameKit -framework GLKit -framework Foundation /Users/domen/Desktop/testIOS/testGodot.a -Xlinker -dependency_info -Xlinker /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/Objects-normal/i386/testGodot_dependency_info.dat -o /Users/domen/Library/Developer/Xcode/DerivedData/testGodot-eieijurgstyvkhffrajslchmbxah/Build/Intermediates.noindex/testGodot.build/Debug-iphonesimulator/testGodot.build/Objects-normal/i386/testGodot

ld: warning: ignoring file /Users/domen/Desktop/testIOS/testGodot.a, missing required architecture i386 in file /Users/domen/Desktop/testIOS/testGodot.a (2 slices)
ld: entry point (_main) undefined. for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Dummy.cpp empty files, no code.

bug ios buildsystem

All 5 comments

Are you attempting to build for the device or the simulator?

Can you try enabling "Build Active Architecture Only" in the Build Settings? Should be YES.

I'm working on improving the iOS build system, I've made a ton of progress recently and I hope to open a PR soon.

https://samwize.com/2015/01/14/what-is-build-active-architecture-only/

This is entirely unrelated to #18359 by the way.

Thank you very much.

I'm assuming that building active architecture resolve your issue.

Set "Build Active Architecture Only" to YES, solve this problem and now run on the emulator

Was this page helpful?
0 / 5 - 0 ratings