How to install SDL2 development files in fossapup?

Moderators: 666philb, Forum moderators

Post Reply
User avatar
user1234
Posts: 416
Joined: Sat Feb 26, 2022 5:48 am
Location: Somewhere on earth
Has thanked: 155 times
Been thanked: 90 times

How to install SDL2 development files in fossapup?

Post by user1234 »

I have installed all the sdl2 libraries that I could find in PPM, but I don't think any of them contained its dev libraries. Though when manually searching for sdl libraries using

Code: Select all

find / -name sdl*

I get the names of a lot of sdl header files.

I think then only the sdl2 image dev package would be needed, which I cannot find anywhere.

Also when I try to compile any sdl c program I get an error saying "/usr/bin/ld: cannot find -lSDL2_image" when I do not include sdl2 image header file from within the code (#include prepocessor directive), and when I include the header file I get an error saying "hello3_image.c:8:10: fatal error: SDL2/SDL_image.h: No such file or directory".

The difference in the errors is only due to the one getting error at preprocessing and one at linking, I think.

So, how can I install SDL2_image development files, and the other SDL2 dev files you think might be necessary?

PuppyLinux 🐾 gives new life to old computers ✨

User avatar
OscarTalks
Posts: 624
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 248 times

Re: How to install SDL2 development files in fossapup?

Post by OscarTalks »

Use PPM to search for and install libsdl2-image-dev
There is also libsdl2-mixer-dev for audio
Plus some others less likely to be needed like libsdl2-ttf-dev for fonts
The names of SDL (1.2) and SDL2 packages can be confusing unless you pay close attention
Remember that you have to tick the DEV option in PPM for development libraries to be displayed

User avatar
rockedge
Site Admin
Posts: 7164
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 3243 times
Been thanked: 3049 times
Contact:

Re: How to install SDL2 development files in fossapup?

Post by rockedge »

Remember that you have to tick the DEV option in PPM for development libraries to be displayed

important to make it easy to find the dev packages in PPM

User avatar
user1234
Posts: 416
Joined: Sat Feb 26, 2022 5:48 am
Location: Somewhere on earth
Has thanked: 155 times
Been thanked: 90 times

Re: How to install SDL2 development files in fossapup?

Post by user1234 »

OscarTalks wrote: Thu May 05, 2022 12:07 pm

Remember that you have to tick the DEV option in PPM for development libraries to be displayed

Got it. Had not ticked the dev option. Thanks!

PuppyLinux 🐾 gives new life to old computers ✨

Post Reply

Return to “Fossapup64”