Newbi question

What are people using in Linux for SDL development. Im new to coding in
this environment and
so far have been using vim and the G++ compiler from in an xterm command
line. Any suggestions
would be great. Do you write your own Makefiles or use autoconf/automake
to generate these?

Hi Mike,

you can use kdevelop, e.g.

But i compile my project basically with

gcc .c -o sdl-config --libs sdl-config --cflags -lm
-lSDL_image

sdl-config generates needed gcc args.

-lSDL_image is needed for using IMG_Load() where you have to #include
<SDL/SDL_image.h>

For editing i recommend jEdit (www.jedit.org) a powerful editor written in
Java.

For debugging i compile my project with the -ggdb compiler option. After that
i start ddd, a graphical debugger which itself uses gdb.

I use this simple makefile template:

[makefile on]
: .c .h
gcc -ggdb .c -o sdl-config --libs sdl-config --cflags -lm -lSDL_image

09: .c .h
gcc -O9 .c -o sdl-config --libs sdl-config --cflags
-lm -lSDL_image

.PHONEY: clean debug

clean:
rm -f *.o

debug:
ddd &

[makefile off]

If you debug your SDL-prog (make debug) i recommend not to use full screen
mode (SDL_FULLSCREEN).> What are people using in Linux for SDL development. Im new to coding in

this environment and
so far have been using vim and the G++ compiler from in an xterm command
line. Any suggestions
would be great. Do you write your own Makefiles or use autoconf/automake
to generate these?

What are people using in Linux for SDL development. Im new to coding in
this environment and so far have been using vim and the G++ compiler from in
an xterm command line.

Personally, I use vim as my editor, and the g++ compiler from in an xterm
command line :wink: Well, I use make rather than g++ directly…

I think it depends on what development style you like. If you want to use an
IDE, then I recommend KDevelop, although I have not used it to code SDL
applications.

http://www.kdevelop.org

If you prefer a plain old editor, there are plenty to choose from and the only
real suggestion I can give is to try a couple until you find one you like. My
favorites are

  • Vim. Your already using it so know what it’s like. Has pretty much every
    feature under the sun if you know where to look for them - e.g. Ctrl-P whilst
    typing a word for autocompletion, type :make to make your project whilst
    inside vim, and then use :cnext and :cprevious to move to the line with a
    compile error on. p.s. I’m a vim fanatic :wink:

  • Kate (KDE Avanced Text Editor). Part of KDE, a very nice editor, has a
    directory browser along the side to select files which is very useful when
    your editing lots of source files, lots of programmer-related features such
    as syntax highlighting, smart indentation, etc. Has a built in x term, which
    can optionally stay synchronised with your current working directory - useful
    for typing ‘make’ :wink:

Any suggestions would be great. Do you write your own Makefiles or use
autoconf/automake to generate these?

How grandiose are your ideas? :slight_smile: If you are planning on writing anything that
will grow to a reasonable size, I would recommend using autoconf/automake as
it will save you time in the long run - especially if you are interested in
other people compiling your code on various distros/operating systems.

When I started my project, I found a great .tgz on the web that contained a
template project (fill in your project name and away you go) for autoconf and
libSDL, as well as scripts to cross-compile the project for windows from
linux, which was of interest to me at the time. I did a quick google search,
and I believe that this is the site :

http://david.acz.org/sdl.html

Hope that helps,

Cheers,
JasonOn Saturday 26 Jul 2003 8:20 pm, mike masino wrote:


Jason Wood
Homepage : www.uchian.pwp.blueyonder.co.uk

What are people using in Linux for SDL development. Im new to coding in
this environment and
so far have been using vim and the G++ compiler from in an xterm command
line. Any suggestions
would be great. Do you write your own Makefiles or use autoconf/automake
to generate these?

I personaly use Emacs with G++, i’ve run autoconf and automake after like 2
day of reading at the GNU website, and it’s run fine. But the learning curve
to use autoconf and automake is quite hard. but you can search related topic
to help you, like autoscan (that make a basic template for autoconf),
aclocal, autoheader. But i’m out of topic now.

I’ve tried kdevelop but didn’t get any success with it (didn’t generate
makefile for me, crash at random time, etc so i can’t give a good advice
about it.)

As for vi i just didn’t take the time to learn how to use it.

As long as you are happy with your coding environement, there’s no problem
:slight_smile:

Karl.>From: “mike masino” <mike.masino at ces.uwex.edu>

Reply-To: sdl at libsdl.org
To:
Subject: [SDL] newbi question
Date: Sat, 26 Jul 2003 14:20:30 -0500


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

Everyone has their favorite editor, chosen by criteria that are highly
subjective. Personally, I like NEdit, but ymmv.

I write makefiles so that I can compile for Linux or Windows, and then type:
make ; to build for normal users
make win ; to build for users who think Windows is a real OS

If you do a complex enough project, you should probably use
autoconf/automake, but I haven’t had the need so far.

Have fun,
JOn Saturday 26 July 2003 12:20 pm, mike masino wrote:

so far have been using vim and the G++ compiler from in an xterm command
line. Any suggestions
would be great. Do you write your own Makefiles or use autoconf/automake
to generate these?

Please reply directly to the author. This is off topic.

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

What are people using in Linux for SDL development. Im new to coding in
this environment and so far have been using vim and the G++ compiler from in
an xterm command line.

Personally, I use vim as my editor, and the g++ compiler from in an xterm
command line :wink: Well, I use make rather than g++ directly…

(hey, there’s nothing wrong with using vim, nano, etc, from the command
line to code… dunno why people think they have to have an
alternative…)

Throwing in my two cents, I personally like Kate. Kate allows you to
have a list of all openned files that you can use shortcut keys to cycle
through in this pseudo-project format. Plus it has all the syntax
highlighting you’d want… for nearly any language.

However, I’ll admit I love Nano with it’s new syntax highlighting and
regex features.

I think it depends on what development style you like. If you want to use an
IDE, then I recommend KDevelop, although I have not used it to code SDL
applications.

http://www.kdevelop.org

I just wanted to point out that I have a rather outdated HOWTO on
KDevelop+SDL here: http://www.geekcomix.com/snh/files/docs/sdl-kdev/

However, like I said, it’s really outdated as I no longer use KDevelop.
The nice thing about KDevelop is that it can do project file management
for you and integrate with things like CVS. The problem is that, out of
the box, it doesn’t integrate well into an SDL project (at least, it
used to not… could be better now :wink:

What I was wondering was: Would anyone else on this list who uses
KDevelop+SDL care to take over maintenance of this mini-HOWTO? (And
bring it up-to-date… I really hate to see it languishing on my site
:wink: If so… contact me.On Sun, 2003-07-27 at 12:42, Jason Wood wrote:

On Saturday 26 Jul 2003 8:20 pm, mike masino wrote:


Sam Hart -
PERSONAL @Sam_Hart | http://www.geekcomix.com/snh/
WORK hart at physics.arizona.edu | http://geekcomix.com/classnotes/
TUX4KIDS criswell at tux4kids.net | http://www.tux4kids.org/
BIGMAN sam at bigmannetworks.com | http://www.bigmannetworks.com/