LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2004, 03:25 PM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
SDL on Linux


Hi. I was just wondering if anyone knew of a Linux SDL setup guide. I was just getting into SDL when I switched to Linux several weeks ago and all I can find are a bunch of Windows SDL setup guides.
Thanks.
 
Old 02-16-2004, 04:05 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Setup? By that do you mean how to install SDL? If that's the case, the download page is here:

http://www.libsdl.org/download-1.2.php
 
Old 02-16-2004, 04:06 PM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
unconnected but..... hmmmm, your signature is from..... Mortal Kombat? I love that game...
 
Old 02-16-2004, 04:31 PM   #4
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
basically just download either SDL 1.2 or... uh... whatever the other version is as source, ./configure, make, make install... you can also probably get it as an rpm on http://www.rpmfind.net


frozen bubble (http://www.frozen-bubble.org) is an open source game for example linux SDL code (I would assume it's basically the same as Windoze though).

HTH

B.

Last edited by german; 02-16-2004 at 04:33 PM.
 
Old 02-16-2004, 05:29 PM   #5
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Megaman X
unconnected but..... hmmmm, your signature is from..... Mortal Kombat? I love that game...
Heh, yes! That quote from the Mortal Kombat 3 start up screen has always stuck with me after playing that game for countless hours as a kid.

Anyways, back on topic. Hmm, just download and install, huh? I did that already but I was wondering. Coming from a Windows background and all... Is that it? I had to go through a 30 minute process to enable SDL in my projects on Windows. How to I go about that on Linux?
 
Old 02-16-2004, 09:30 PM   #6
german
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Debian etch, Gentoo
Posts: 312

Rep: Reputation: 30
add the SDL libary path to /etc/ld.so.conf if it is not already and make sure when you compile your code the dir with the SDL header files are included with the -I flag (IE: gcc -I/usr/local/sdl/include -o mysdlapp mysdlapp.c)

Beyond that you're out of the scope of my knowledge for C/C++. I understand the perl bindings for SDL are very good.

B.
 
Old 02-16-2004, 11:28 PM   #7
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Doesn't it work by just adding #include <SDL.h> at the beginning of your code?
 
Old 02-17-2004, 01:32 AM   #8
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Heh, yep. Thanks. Who'd have thought Windows made things more complicated than need be? o_O
 
Old 02-17-2004, 02:33 AM   #9
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
More or less . If you were choosing to code using DirectX it should be pretty simple. Even Visual Basic supports DirectX . But hey, you've done a great choice picking SDL . Portability always .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
question on NeHe OpenGL/SDL/linux tutorial Moebius Programming 0 12-08-2004 10:05 PM
about SDL dt_ashok Programming 1 12-01-2004 03:16 PM
SDL Help dtheorem Linux - Software 1 11-04-2004 04:38 AM
Sdl timcrafton Linux - Games 8 10-13-2004 01:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration