SDL2_image not found

Hello,

I am trying to run the github project found at the link on the bottom of the page below:

When I run the project at cmake … I get the following error:

The C compiler identification is GNU 5.5.0

– The CXX compiler identification is GNU 7.5.0

– Check for working C compiler: /usr/bin/cc

– Check for working C compiler: /usr/bin/cc – works

– Detecting C compiler ABI info

– Detecting C compiler ABI info - done

– Detecting C compile features

– Detecting C compile features - done

– Check for working CXX compiler: /usr/bin/g+±7

– Check for working CXX compiler: /usr/bin/g+±7 – works

– Detecting CXX compiler ABI info

– Detecting CXX compiler ABI info - done

– Detecting CXX compile features

– Detecting CXX compile features - done

– Looking for pthread.h

– Looking for pthread.h - found

– Looking for pthread_create

– Looking for pthread_create - not found

– Looking for pthread_create in pthreads

– Looking for pthread_create in pthreads - not found

– Looking for pthread_create in pthread

– Looking for pthread_create in pthread - found

– Found Threads: TRUE

– Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread

CMake Error at /usr/local/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

Could NOT find SDL2_image (missing: SDL2_IMAGE_LIBRARIES

SDL2_IMAGE_INCLUDE_DIRS)

Call Stack (most recent call first):

/usr/local/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)

cmake/FindSDL2_image.cmake:93 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

CMakeLists.txt:8 (find_package)

– Configuring incomplete, errors occurred!

See also “/home/workspace/SDL2Test/build/CMakeFiles/CMakeOutput.log”.

See also “/home/workspace/SDL2Test/build/CMakeFiles/CMakeError.log”.

I have a project with pngs and I am running this one first so I can then figure out how to make my own CMakeLists.txt.
Any help would be much appreciated.
Thanks.

You need libsdl-image-dev, SDL2_image-devel, or similar installed (depending on the distro you’re using) to have the SDL2_image headers.