SwiftUI MacOS gives Error: Undefined symbol: _main

Subha Narayanan

I downloaded a SwiftUI source that was built with Xcode Version 12.0 Beta 6, MacOS BigSur version 11.0 Beta. My system was MacOS Catalina, Xcode version 12.0.1.

While compiling, I faced lot of conversion errors one being @main attribute present in AppDelegate.swift

I removed the variable and built the application which resulted in the following error:

Error: Undefined symbol: _main

Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable

Subha Narayanan

To solve the above issue, replace @main attribute in AppDelegate.swift with @NSApplicationMain attribute.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Importing any module in cython file gives undefined symbol error

clFFT Library : ./main_exe: symbol lookup error: ./main_exe: undefined symbol: clfftInitSetupData

dlopen - Undefined symbol error

Why compiler gives me error "undefined external symbol" when I don't use libraries?

Setting a main window title for macOS SwiftUI app?

aptitude: symbol lookup error: aptitude: undefined symbol

"skype: symbol lookup error: skype: undefined symbol"

error caused by undefined symbol: glXGetProcAddress

Error message: WickrMe: undefined symbol

How to solve this error: Undefined symbol

Factory function gives "Error: is undefined

Why "symbol lookup error", "undefined symbol" when the symbol exists

Flutter Xcode Error Undefined symbol: _MDFInsetsFlippedHorizontally and Undefined symbol: _MDFRectFlippedHorizontally

sed with a comment in macOS, it gives me an error

Starting gitk on macOS gives an error application is not running

SwiftUI on macOS, how to use custom image symbol on Button?

cython wrapping of a templated c++ class gives undefined symbol

ERROR in undefined is not iterable! @ multi main

Undefined subroutines &main error in Perl

Linker error: undefined reference to `main'

undefined method error in main:Object

SwiftUI - Preview canvas gives Coordinated install error

SwiftUI - Text working, TextField gives error

NULL value on main report gives error

Git pull origin main gives error Aborting

List.of gives error: cannot find symbol error

Custom Python extension - Import error: undefined symbol

Undefined reference error but symbol existing in the library

Undefined Symbol Error when running SDL program