Search code examples
iosxcodesdlsdl-2

Xcode 13 failing building with "entry point (_main) undefined. for architecture arm64"


I am trying to build a SDL (libsdl.org) iOS app I havent built for a few years and I am having some problem. Have the following settings: enter image description here The error I get is:

ld: warning: ignoring file /Users/username/Library/Developer/Xcode/DerivedData/APPNAME-acpmwonxbccjqtaxaenqojducdea/Build/Products/Debug-iphonesimulator/libAPPNAME2.a, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64

ld: entry point (_main) undefined. for architecture arm64

I am not sure if the first warning is related to the error. I have a target for an archive with SDL source files.

If I add arm64 to "Excluded Architectures" (based on other stackoverflow answers) it builds but I get a "Executable Not Found" error message.

Any ideas?


Solution

  • Removing: "VALID_ARCHS[sdk=*]" = "arm64 armv7 armv7s"; from project.pbxproj solved the problem