-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link error on Apple mobile targets #506
Comments
This should just be EMSCRIPTEN: |
The error is still valid: using static libraries should still work. here |
The problem is that if you statically link SDL_image you need to link all the frameworks it uses in the application, which is what @Ravbug's fix is doing. But really we shouldn't be statically linking it. (You probably also need to put SDL3 last, but that's separate from this issue) |
You're right: SDL3 should be used as a shared library. But CMake should handle static libraries for us: it propagates these to the final shared library or executable. |
Ah, in that case, we probably need to do something like that in the SDL_image CMakeLists.txt for those frameworks. Can you take a look? |
I'm adding an SDL_Image demo to SDL3 Sample. When building for iOS, tvOS and visionOS I get this linker error:
I was able to fix it in SDL3 Sample by explicitly linking ImageIO and CoreServices:
Is it expected for users to link these libraries? Or should SDL_Image be linking them automatically?
The text was updated successfully, but these errors were encountered: