1

I am trying to use Swift for the 1st time on Linux and intend to create a small executable with SwiftImGui.

Here is my Package.swift:

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

import PackageDescription

let package = Package(
    name: "Impulse",
    dependencies: [
        .package(url: "https://github.com/ctreffs/SwiftImGui.git", from: "1.89.5"),
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .executableTarget(
            name: "Impulse", dependencies: ["ImGui"]),
    ]
)

Unfortunately it doesn't build:

> swift build                                                                                                               
error: 'impulse': product 'ImGui' required by package 'impulse' target 'Impulse' not found.

What is wrong? Is there a fix for this?

Could it cause problem that SwiftImGui's tool version is older?: // swift-tools-version:5.3

0

1 Answer 1

0

This way the build process went forward:

...
        .executableTarget(
            name: "Impulse", dependencies: [.product(name: "ImGui", package: "SwiftImGui")]),
...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.