SDL Image

Started by
3 comments, last by fastcall22 8 years, 7 months ago
Hey Guy, help me install SDL Image on my DEV C++
I tried some ways , but i failed D:
I saw in some tutorials, but it did not work
Thanks!
Advertisement
Easy.
  • Uninstall Dev C++
  • Install Visual Studio 2015 Community Edition (free), CodeBlocks (free), Qt (free)
  • Download and extract SDL_Image to your library folder /usr/lib or \lib\cpp\SDL_Image or what have you
  • Add the appropriate include path to the include directories of your project's build configuration
  • Add the appropriate library path to the library directories of your project's build configuration
  • Add SDL_Image.lib/.a/.o to your project's linker configuration
  • Copy SDL_Image.dll and its dependencies to your executable's working directory
And you're done!
Nice idea, throwing out your entire toolchain to add a library tongue.png

Why not suggest to install some Linux, so you can install it from the package manager? No need to mess with configurations then.


My usual solution is usually to build such a package from source instead. Download the source code, build the library and install it.

Hey Guy, help me install SDL Image on my DEV C++
I tried some ways , but i failed D:
I saw in some tutorials, but it did not work
Thanks!

Under project options-> Directories -> Library Directories add the folder that contains the SDL image library. You'll have to the same thing for the header files but under the Include Directory tab. Should be no different than the steps you followed to use SDL assuming you got SDL to work before trying to add SDL Image.

Then under Parameters in Project Properties in the Linker box add in order
-lmingw32 -lSDL2main -lSDL2 -lSDL2_image

Also, I am not family enough with Dev-C++ to know if using the add Library button means you don't have to set the search path.

I am assuming SDL 2 if not change names accordingly.
Patrick

Nice idea, throwing out your entire toolchain to add a library


Calling Dev-C++ a toolchain these days is giving it too much credit.

http://clicktobegin.net/programming/why-you-shouldnt-use-dev-c/ still applies in 2015.

This topic is closed to new replies.

Advertisement