Reputation: 9
I was trying to compile a C project but the compiler says that SDL image is not installed despite the fact that SDL image is clearly installed.
Output Of DNF Command:
Package SDL_image-devel-1.2.12-31.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Output Of C Compiler:
src/assets.c:4:10: fatal error: 'SDL2/SDL_image.h' file not found
#include <SDL2/SDL_image.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
src/main.c:8:10: fatal error: 'SDL2/SDL_image.h' file not found
#include <SDL2/SDL_image.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
src/screen.c:4:10: fatal error: 'SDL2/SDL_image.h' file not found
#include <SDL2/SDL_image.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
In file included from src/world.c:4:
src/assets.h:5:10: fatal error: 'SDL2/SDL_image.h' file not found
#include <SDL2/SDL_image.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
I've tried removing and re-installing the package but that did not appear to work. I've googled but I can't seem to find anyone else with this problem.
Upvotes: 0
Views: 508
Reputation: 18409
There are two independent branches of SDL_image - SDL_image for SDL 1.2, and SDL2_image for SDL2. So you need to install SDL2_image-devel
. And link with SDL2_image
.
Upvotes: 1