twostraws / SwiftGD

A simple Swift wrapper for libgd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such module 'SwiftGD'

opened this issue · comments

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"]),
]
)

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!

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

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"),
            ]

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