swhitty/SwiftDraw

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

Azilla030 opened this issue · 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

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.

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

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.