LAST CHANCE: Save 50% on all my Swift books and bundles! >>

Day 37 - Building a list we can delete from - Build Error [Entry point (_main) undefined. for architecture x86_64]

Forums > 100 Days of SwiftUI


Hi there, I have having a problem with compiling the first part of this lesson at this point:

I am recieving a Entry point (_main) undefined. for architecture x86_64 error.

I tried to add @main to my ContentView.swift code but that produced more errors.

All of the solutions to this error I can find online see to be for older versions of XCode / Swift.

I am trying to build foriPhone SE 3rd GenusingXCode 14.1 running Ventura 13.0.1 (22A400) on a MacBook Air Retina, 13-inch, 2020

Any ideas how to track this down? Thanks.


If I download project 7 from there is a file in the project called iExpense.swiftthat contains:

import SwiftUI

struct iExpenseApp: App {
    var body: some Scene {
        WindowGroup {

When I add this file and code to my project it compiles.

However this doesn't seem to be in the tutorials at least not the first video? Or have I missed something?


when you created a new project did you delete any files? if you did you shouldnt, make a new project and follow the tutorial in ContentView. lmk if i understood badly



@Nanometer54 I don't believe I deleted anything. But I did get it working after adding the needed file / code.


Hacking with Swift is sponsored by Essential Developer.

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until July 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.