Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such module 'SwiftGD' #21

Open
ghost opened this issue Aug 21, 2019 · 4 comments
Open

No such module 'SwiftGD' #21

ghost opened this issue Aug 21, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Aug 21, 2019

I've installed gd using "brew install gd". I'm running a Kitura REST web service that does image manipulation and returns to the client! Mac OS Mojave latest version!

Can this library run in both Linux and MacOS? Also the issue. Can I draw image as eclipse or rectangle?

Then below is the package declaration but getting no such module "SwiftGD"

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

import PackageDescription

let package = Package(
name: "Project",
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/IBM-Swift/Kitura.git", from: "2.5.0"),
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", from: "1.7.1"),
.package(url: "https://github.com/IBM-Swift/Kitura-CredentialsFacebook.git", from: "2.2.0"),
.package(url: "https://github.com/IBM-Swift/Kitura-CredentialsGoogle.git", from: "2.2.0"),
.package(url: "https://github.com/IBM-Swift/Kitura-CredentialsHTTP.git", from: "2.1.0"),
// .package(url: "https://github.com/mongodb/mongo-swift-driver", .branch("master"))
.package(url: "https://github.com/mongodb/mongo-swift-driver", from: "0.1.3"),
.package(url: "https://github.com/twostraws/SwiftGD.git", from: "2.0.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Project",
dependencies: ["MongoSwift", "Kitura" , "HeliumLogger", "CredentialsFacebook", "CredentialsGoogle", "CredentialsHTTP", "SwiftGD"]),
.testTarget(
name: "ProjectTests",
dependencies: ["Project"]),
]
)

@ghost
Copy link
Author

ghost commented Aug 22, 2019

Anybody can reply? I need it urgently! Else I need to code from scratch and takes time! I'm not forcing and its my situation!

@YnotProgramInSwift
Copy link

I have the same issue but for Vapor Framework. except my error is no such module as gd in the Format.swift file

@HosMercury
Copy link

HosMercury commented Dec 8, 2021

You have to add it in 2 places

   dependencies: [
        // 💧 A server-side Swift web framework.
        .package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
        .package(url: "https://github.com/vapor/fluent.git", from: "4.0.0"),
        .package(url: "https://github.com/vapor/fluent-postgres-driver.git", from: "2.0.0"),
        .package(url: "https://github.com/vapor/leaf.git", from: "4.0.0"),
        .package(url: "https://github.com/twostraws/SwiftGD.git", from: "2.0.0")
    ]
      dependencies: [
                .product(name: "Fluent", package: "fluent"),
                .product(name: "FluentPostgresDriver", package: "fluent-postgres-driver"),
                .product(name: "Leaf", package: "leaf"),
                .product(name: "Vapor", package: "vapor"),
                .product(name: "SwiftGD", package: "SwiftGD"),
            ]

@shial4
Copy link

shial4 commented Aug 31, 2023

It isn't working for me with Swift package manager & Vapor,
Neither Docker, nor MacOs

...SourcePackages/checkouts/SwiftGD/Sources/gd/swiftgd_gd.h:1:10 'gd.h' file not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants