[SDL] newbi question

Walter Weber-Groß wwg at arco.in-berlin.de
Sun Jul 27 11:55:00 PDT 2003


Hi Mike,

you can use kdevelop, e.g.

But i compile my project basically with

gcc <source>.c -o <executable> `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]
<executable>: <source>.c <source>.h
	gcc -ggdb <source>.c -o <executable> `sdl-config --libs` `sdl-config 
--cflags` -lm -lSDL_image

<executable>09: <source>.c <source>.h
	gcc -O9 <source>.c -o <executable> `sdl-config --libs` `sdl-config --cflags` 
-lm -lSDL_image

.PHONEY: clean debug

clean:
	rm -f <executable> *.o

debug:
	ddd <executable> &

[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?





More information about the SDL mailing list