stackotter / swift-cross-ui

A cross-platform declarative UI framework, inspired by SwiftUI.
https://stackotter.github.io/swift-cross-ui/documentation/swiftcrossui/
MIT License
652 stars 36 forks source link

Building basic app with library fails. #72

Closed thecodecommander2580 closed 11 months ago

thecodecommander2580 commented 11 months ago

When building using the provided example code in the README, I get the error: "error: no such module 'GtkBackend'". Building the examples provided in the repo works just fine. I am building under WSL 2 Ubuntu.

stackotter commented 11 months ago

Have you installed Gtk 4, added GtkBackend as a dependency in your Package.swift, and imported GtkBackend? Those are the first things that come to mind from that error

thecodecommander2580 commented 11 months ago

The GtkBackend dependency was the problem. Thanks! Also, the example code from README.md doesn't compile anymore. You should probably update it to match the code in the Examples folder.

stackotter commented 11 months ago

Awesome!

Ah whoops, it seems I typoed while updating the example a few days ago, some ViewContent should be some Scene. Thanks for letting me know!