TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

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 Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

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.