skip to Main Content
ld: entry point (_main) undefined. for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It was building and running with the simulator the day I created the project. But now, it does not build.

The app project does not contain a AppDelegate file. I heard on recent versions of XCode (12.3), that the file is not needed. Should I create one and if so how?

Any suggestions?

2

Answers


  1. I have found that deleting the derived data folder found under preferences usually solves unexpected / unexplained Xcode errors. Before you delete the folder, quit Xcode and then start again afterwards.

    Login or Signup to reply.
  2. If your project is in SwiftUI, it is probably the inconsistency of not having an App swift file or a SceneDelegate file that serves as an entry point of your app.

    If your project does not have a SceneDelagate.swift file, it should at least have an App file which looks something like belowenter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search