Cannot run counter app #53

Closed
opened 2025-02-23 22:42:59 +01:00 by jj11 · 1 comment

Describe the bug

Got an error

/home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/Core/Menu/MenuButton.swift:8:8: error: could not build C module 'CAdw'
 6 | //
 7 |
 8 | import CAdw
   |        `- error: could not build C module 'CAdw'
 9 |
10 | /// A button widget for menus.
<module-includes>:1:10: note: in file included from <module-includes>:1:
1 | #include "shim.h"
  |          `- note: in file included from <module-includes>:1:
2 |

/home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/CAdw/shim.h:1:10: error: 'adwaita.h' file not found
 1 | #include <adwaita.h>
   |          `- error: 'adwaita.h' file not found
 2 | #include <gtk/gtk.h>
 3 |

/home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/Core/Menu/MenuButton.swift:8:8: error: could not build C module 'CAdw'
 6 | //
 7 |
 8 | import CAdw
   |        `- error: could not build C module 'CAdw'
 9 |
10 | /// A button widget for menus.

To Reproduce

swift build command

// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "Landmark",
    dependencies: [
        .package(url: "https://git.aparoksha.dev/aparoksha/adwaita-swift", branch: "main")
    ],
    targets: [
        .executableTarget(
            name: "Landmark",
            dependencies: [
                .product(name: "Adwaita", package: "adwaita-swift")
            ]
        )
    ]
)

Expected behavior

To build the app and run the counter app

Additional context

No response

### Describe the bug Got an error ``` /home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/Core/Menu/MenuButton.swift:8:8: error: could not build C module 'CAdw' 6 | // 7 | 8 | import CAdw | `- error: could not build C module 'CAdw' 9 | 10 | /// A button widget for menus. <module-includes>:1:10: note: in file included from <module-includes>:1: 1 | #include "shim.h" | `- note: in file included from <module-includes>:1: 2 | /home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/CAdw/shim.h:1:10: error: 'adwaita.h' file not found 1 | #include <adwaita.h> | `- error: 'adwaita.h' file not found 2 | #include <gtk/gtk.h> 3 | /home/joker/Desktop/Landmark/.build/checkouts/adwaita-swift/Sources/Core/Menu/MenuButton.swift:8:8: error: could not build C module 'CAdw' 6 | // 7 | 8 | import CAdw | `- error: could not build C module 'CAdw' 9 | 10 | /// A button widget for menus. ``` ### To Reproduce `swift build` command ``` // swift-tools-version: 6.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "Landmark", dependencies: [ .package(url: "https://git.aparoksha.dev/aparoksha/adwaita-swift", branch: "main") ], targets: [ .executableTarget( name: "Landmark", dependencies: [ .product(name: "Adwaita", package: "adwaita-swift") ] ) ] ) ``` ### Expected behavior To build the app and run the counter app ### Additional context _No response_
jj11 added the
bug
label 2025-02-23 22:42:59 +01:00
Author

Sorry I found the solution, it was my mistake. I followed the template code!!

Firstly thank you for your hard on bring swift and libadwaita to linux, hoping to make swift apps since I love it. I was looking for something.

Sorry I found the solution, it was my mistake. I followed the template code!! Firstly thank you for your hard on bring swift and libadwaita to linux, hoping to make swift apps since I love it. I was looking for something.
jj11 closed this issue 2025-02-24 07:00:36 +01:00
Sign in to join this conversation.
No Milestone
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aparoksha/adwaita-swift#53
No description provided.