twostraws / SwiftGD

A simple Swift wrapper for libgd
MIT License
457 stars 71 forks source link

gdImagePtr not found in 2.5.0, but found in 2.4.0 #24

Open axello opened 4 years ago

axello commented 4 years ago

I have a strange regression bug. Version 2.5.0 gives tons of `use of undeclared type 'gdImagePtr' errors, but v2.4.0 does not.

steps taken:

However, when I upgraded to SwiftGD 2.5.0 again, removing the xcodeproj and deep cleaning the build folder, and adding the library search paths did not work anymore.

The only discrepancy I see, is that the Format.swift file is in different positions: 2.4.0: checkouts/SwiftGD/Sources/Format.swift 2.5.0: checkouts/SwiftGD/Sources/SwiftGD/Format.swift

Also, it does link with the gd library, as you can see from the compile statement.

Build project5-Package_SwiftGD2.5.0.txt.zip Build project5-Package_SwiftGD2.4.0.txt.zip

twostraws commented 4 years ago

Could you see if this problem exists with a fresh project? I just tried it (macOS Catalina) and had no problems on 2.5.0.

axello commented 4 years ago

Sure, this was indeed an old project from 2018 (when the book came out)

Axel

On 22 Feb 2020, at 14:51, Paul Hudson notifications@github.com wrote:

Could you see if this problem exists with a fresh project? I just tried it (macOS Catalina) and had no problems on 2.5.0.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/twostraws/SwiftGD/issues/24?email_source=notifications&email_token=AABEN6KZD2TNATRU6MTOQSLREEUX7A5CNFSM4KZAAH72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVAYRY#issuecomment-589958215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEN6PDEYDFRJ7IBYNU62DREEUX7ANCNFSM4KZAAH7Q.

zcjhnsn commented 4 years ago

I get this bug whilst on a new project following Server-side Swift: Vapor (on Catalina)

sinakhanjani commented 4 years ago

I have same problem MacOSX 10.15.3

Screen Shot 1398-12-21 at 9 56 38 PM
aryamansharda commented 4 years ago

Having the same problem as well

jklompje commented 4 years ago

Having the same problem following the steps outlined for the project in Serverside Swift Vapor. Any solutions yet?

matthew86matthew commented 4 years ago

Same problem(((

jcbriones commented 1 year ago

Same with me. Forward to 2023. 😟 Is there any other library support for both mac and linux? 😟 I'm guessing it has something to do with the architecture?

mcritz commented 1 year ago

Troubleshooting ideas

  1. macOS: Make sure you have brew installed. Link
  2. Try manually installing
  3. Make sure your gd version is up to date.
    • macOS brew update gd
    • Ubuntu / deb - sudo apt-get upgrade libgd-dev
  4. If none of the above are working, try upgrading your package manager itself.
    • macOS brew upgrade
    • Ubuntu / deb - sudo apt-get update

Note

Apologies for posting off-topic. But I'm trying to address the frustrations I see posted here.

Additional details

The Package.swift file in this project has a dependency on the gd library which must be installed on your system for this to work at all. SwiftGD is a wrapper for the gd framework. For macOS users, this will mean installing with brew.