I’ve been stuck on an older release of SDL_image, as I haven’t been able to build it after the SVG support was added.
I initially solved a few build issues by just dropping support for things like WebP, but for some reason I can’t disable SVG support by simply dropping the LOAD_SVG
preprocessor definition.
To reiterate, everything builds and works up to release-2.0.1
, but as soon as SVG support was added I’ve been unable to build, with or without the LOAD_SVG
definition.
I’m building on macOS 10.13.4, with CMake and Clang 9.1.0.
Any help would be greatly appreciated, as I’ve been putting this off for far too long.
Build output:
[build] Undefined symbols for architecture x86_64:
[build] "_IMG_LoadSVG_RW", referenced from:
[build] _supported in libSDL2_image.a(IMG.o)
[build] "_IMG_isSVG", referenced from:
[build] _supported in libSDL2_image.a(IMG.o)
[build] ld: symbol(s) not found for architecture x86_64
EDIT: Forgot to include an example build command:
/usr/bin/xcodebuild -target "Static Library" MACOSX_DEPLOYMENT_TARGET=10.9 GCC_PREPROCESSOR_DEFINITIONS="LOAD_BMP LOAD_GIF LOAD_JPG LOAD_LBM LOAD_PCX LOAD_PNG LOAD_PNM LOAD_TGA LOAD_TIF LOAD_XPM LOAD_XV" HEADER_SEARCH_PATHS=${SDL2_INCLUDE_PATH} -configuration Debug -project ${SDL_IMAGE_PATH}/Xcode/SDL_image.xcodeproj
EDIT 2: Looks like libSDL2_image.a
doesn’t actually contain IMG_svg.o
even if I build it with LOAD_SVG
, which is most likely where the issue comes from. It’s dropping the SVG support, even though it really shouldn’t.