swhitty / SwiftDraw

Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
zlib License
326 stars 41 forks source link

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

Closed Azilla030 closed 10 months ago

Azilla030 commented 1 year ago

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

swhitty commented 1 year ago

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.

Azilla030 commented 1 year ago

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

swhitty commented 1 year ago

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.