Hello,
Trying my hand at a bit of coding with the SDL libraries. I am relatively
new to C programming (just finished up a class), although I have been
programming in perl for several years.
I am starting with a very simple program to print some text (using
SDL_ttf) in a window. The program compiles ok, (compile parameters
included below), however when the call to SDL_SetColors is made, the
program segaults. Attached is the program (example.c) and below is
the output on the console.
- Compile:
$ gcc example.c sdl-config --libs --cflags
-lSDL_ttf
$ ./a.out
All things initialized correctly
about to call SDL_SetColors
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
$
- sdl-config output (to get an idea of what flags are being used aside
from -lSDL_ttf):
$ sdl-config --libs --cflags
-L/usr/lib -lSDL -lpthread -L/usr/X11R6/lib -lXxf86dga -lXxf86vm -lXv
-I/usr/include/SDL -D_REENTRANT
$
All help is greatly appreciated.
See below for relevant source code example.–
Nick Jennings
-------------- next part --------------
A non-text attachment was scrubbed…
Name: example.c
Type: text/x-csrc
Size: 1978 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020104/4d7bb842/attachment.c