SwiftDraw icon indicating copy to clipboard operation
SwiftDraw copied to clipboard

error build: Entry point (_main) undefined. for architecture x86_64

Open Azilla030 opened this issue 2 years ago • 3 comments

I have two error the first is in the title and second one is: "/Users/alexanderruder/Library/Developer/Xcode/DerivedData/W4U-Risikoapp-avswhmmknksifadrneimtyrnozkq/SourcePackages/checkouts/SwiftDraw/SwiftDraw/Parser.XML.StyleSheet.swift:167:16: error build: Cannot find type 'SwiftDraw' in scope

Thanks in advance

Azilla030 avatar Sep 26 '22 09:09 Azilla030

Thanks for reporting this @Azilla030

May I ask which target are you trying to build? The SwiftDraw library or the swiftdraw command line executable? Which version of a code are you using? And how are you building, spm, cocoa pods or Xcode?

I have experienced some similar errors myself — I think naming of the library and executable trigger a case fold issue in the latest compilers, but a clean build or recreating the schemes normally fixes it for me.

swhitty avatar Sep 26 '22 10:09 swhitty

I try to integrate SwiftDraw Module in my Swift File the swift draw command line works fine I could generate a file. What do you mean with "but a clean build or recreating the schemes normally fixes it for me" I'm new in Swift or in Mobile Development. I attach you an screenshot where the error is in the file: The file is Parser.XML.StyleSheet.swift

Bildschirmfoto 2022-09-26 um 13 29 31

Azilla030 avatar Sep 26 '22 11:09 Azilla030

Have you copy and pasted the code into your app? It looks like the SwiftDraw module does not exist.

The best way to integrate with an existing app is to use Swift Package Manager like so;

packages dependency

Then you should be able to import SwiftDraw and use the public interface.

swhitty avatar Oct 03 '22 06:10 swhitty