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

sdl help

Started by Crusable77 Mar 4, 2012 at 8:13 AM 2 replies 1.5k views
Original Post
Crusable77
Crusable77
hello,

i have decided to work with sdl and opengl instead of direct x (for now) and am having some trouble. I have recently converted to linux about a month ago and still figuring things out. my question is, i am using code::blocks and i havent found a toutorial on how to set up the sdl stuff for it (on linux anyways) so i want to knwo if anyonw knows or could send me to a toutoral...



Thanks, cheers
Berkay
Berkay
try, cut (SDL folders) bin/include.
SimonForsman
SimonForsman
Don't cut and paste files on Linux, its a bad idea in general.

What distribution are you using ?

If you are using Debian / Ubuntu or some derivate of either then you should use the package manager and install these:
libsdl-1.2debian
libsdl-1.2debian-alsa
libsdl-1.2dev
libsdl-image1.2
libsdl-image1.2-dev
libsdl-mixer1.2
libsdl-mixer1.2-dev
libsdl-net1.2
libsdl-net1.2-dev
For opengl you probably also want these:
mesa-common-dev
libglu1-mesa-dev

Then rightclick on your project (in code::blocks) , select build options, click the linker tab and add the libraries you're using.

(You should install code::blocks using the package manager aswell, and possibly also the build-essentials package (not sure if its installed automatically when you install code::blocks or not), Don't build stuff from source, it tends to become quite painful to uninstall applications cleanly when you do. (unless you build them as a restricted user and keep them fully contained in your home folder)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
zakuro_xn
zakuro_xn
Which version of code::blocks?
Afaik you can use the template for SDL Applications. It's in File->New->Project->SDL Project.
Lazyfoo have some good tutorials on using SDL.

Topic Locked

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

Sign in to reply to this topic.