Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL Image

Started by Paulo Kaedo Sep 18, 2015 at 11:57 AM 3 replies 2.7k views
Original Post
Paulo Kaedo
Paulo Kaedo
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!
fastcall22
fastcall22
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!
Alberth
Alberth
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.
prh99
prh99

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.