Jump to content
  • Advertisement
Sign in to follow this  
Crusable77

sdl help

This topic is 2478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
Advertisement
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!