SwiftGD
SwiftGD copied to clipboard
gdImagePtr not found in 2.5.0, but found in 2.4.0
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:
- SwiftGD 2.5.0 could not find gdImagePtr
- brew reinstall gd
- remove .build
- clean project etc.
- Double-check double setting of /usr/local/lib
- downgraded to SwiftGD 2.4.0
- In the end removing the xcodeproj was the only thing which worked
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.
- Saved both build logs
- downgraded to SwiftGD 2.4.0
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
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.
Sure, this was indeed an old project from 2018 (when the book came out)
Axel
On 22 Feb 2020, at 14:51, Paul Hudson [email protected] 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.
I get this bug whilst on a new project following Server-side Swift: Vapor (on Catalina)
I have same problem MacOSX 10.15.3
Having the same problem as well
Having the same problem following the steps outlined for the project in Serverside Swift Vapor. Any solutions yet?
Same problem(((
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?
Troubleshooting ideas
- macOS: Make sure you have
brew
installed. Link - Try manually installing
- macOS:
libgd
- Brew instructions - Ubuntu / deb -
sudo apt-get install libgd-dev
- macOS:
- Make sure your
gd
version is up to date.- macOS
brew update gd
- Ubuntu / deb -
sudo apt-get upgrade libgd-dev
- macOS
- If none of the above are working, try upgrading your package manager itself.
- macOS
brew upgrade
- Ubuntu / deb -
sudo apt-get update
- macOS
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
.