Hi there, I have having a problem with compiling the first part of this lesson at this point: https://youtu.be/2g1t15bwX44?t=337
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 Gen
usingXCode 14.1
running
Ventura 13.0.1 (22A400)
on a MacBook Air Retina, 13-inch, 2020
Any ideas how to track this down?
Thanks.
EDIT:
If I download project 7 from https://github.com/twostraws/HackingWithSwift there is a file in the project called iExpense.swift
that contains:
import SwiftUI
@main
struct iExpenseApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
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?