Can somebody give me a good resource that teach how I can setup SDL2_image in Linux, I already tried finding for 2 days now but I just cant find anything, I had also tried setting it up myself but I have no Idea how and Im also new to all this stuff so forgive if this question sounds dumb.
Cheers,
-ADumbProgrammer
The easiest way is usually just to install it through your distributions package management system. Make sure to install the “dev” package if there are multiple ones.
On Debian/Ubuntu it should be as simple as:
sudo apt-get install libsdl2-image-dev
(or use Synaptic if you prefer a GUI)
And then just add -lSDL2_image
to your linker flags.
If you want to build it from source (e.g. because your distribution comes with an older version and you want to use the latest version) then you will first have to download the “source code”. The INSTALL file contains instructions for how to build and install it. For Linux there are three commands that you need to exectute:
1.
./configure
If you run this it’s possible that it will fail because you’re missing some libraries. In that case you will need to install those libraries and rerun the ./configure
command. Some libraries might be optional but might be necessary for certain features (e.g. to be able to load certain image formats) so you might want to pay attention to the output and see if something that you need is missing (or redo the whole process if you later realize that something is not working).
2.
make
This will build (compile) the library.
3.
sudo make install
This will install the library.
Omg! Ur a savior thank you very much for this!!!