Linux : How to Load Jpeg with SDL_Image 1.2 .12?


I’m using Ubuntu 12.04 and the SDL Devel
available in the Synaptic Package Manager.

My game runs fine like this, but I created a SdlLib folder within my game
folder, and inside I put the latest versions of SDL_Image, ie: 1.2.12
instead of 1.2.10, and now I can’t load anymore Jpeg files, ie :=====

printf("\tSDL_Image Support : JPG => %d ; PNG => %d; TIF => %d\n",
ImgFlag & IMG_INIT_JPG, ImgFlag & IMG_INIT_PNG, ImgFlag & IMG_INIT_TIF);

prints "JPG => 0 ; PNG => 0; TIF => 0"
instead of “JPG => 1 ; PNG => 2; TIF => 4”.

Loaded Version is 1.2.12 instead of 1.2.10 as shown by this code :

SDL_version compile_version;
const SDL_version *link_version = IMG_Linked_Version();
printf("\tSDL_image version - Compiled: %d.%d.%d - Running: %d.%d.%d\n",
compile_version.major, compile_version.minor, compile_version.patch,
link_version->major, link_version->minor, link_version->patch);

If I put the SDL_Image 1.2.10 inside my SdlLib folder,
then it’s working again
( instead of with the

Anyone would have an idea at what’s happening and how to this fix ?

Thanks in advance for any answer !

after further checking, SDL_Image 1.2.11 doesn’t work as well, so I guess it’s
coz SDL_Image uses Jpeg v8d since 1.2.11 and my Ubuntu 12.04 only have Jpeg v8c
… So I’m going to pack SDL_Image 1.2.10 with my games, hopefully, it’ll be
good enough…