We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4160 - SDL_image does not compile as a static library on macOS (easy fix included)
Summary: SDL_image does not compile as a static library on macOS (easy fix included)
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Mac OS X (All)
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-08 12:51 UTC by Pauli Jokela
Modified: 2018-05-09 03:45 UTC (History)
0 users

See Also:


Attachments
Screenshot of IMG_svg.c not being included with the Static Library target. (34.87 KB, image/png)
2018-05-08 12:51 UTC, Pauli Jokela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pauli Jokela 2018-05-08 12:51:55 UTC
Created attachment 3242 [details]
Screenshot of IMG_svg.c not being included with the Static Library target.

The Xcode project for SDL_image does NOT include IMG_svg.c with static library builds, but DOES include every other file. This is very likely done by accident, and nobody’s noticed it, until now.

The fix is to simply toggle the IMG_svg.c file to be a part of the Static Library target, otherwise it's simply not included with the binary, resulting in compilation errors when including/calling the library from another project.

Attached is a screenshot of the issue (box not ticked).

More information is also available here: https://discourse.libsdl.org/t/cant-build-sdl-image-after-svg-support-was-added/24377
Comment 1 Sam Lantinga 2018-05-09 03:45:24 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_image/rev/887b1e03cad1