[SDL] compiling problems with SDL.h

Jan Kratochvil krata at matfyz.cz
Fri Nov 28 04:47:01 PST 2003

> with command 
> gcc -o myfirst myfirst.c 
> the compiler say:
> SDL.h no such file or directory
> SDL_INIT_VIDEO undeclared
> SDL_INIT_AUDIO undeclared 
> Is gcc command correct ?

try gcc -o a a.c `sdl-config --cflags` `sdl-config --libs` 

> Before compiling I have read sdl faq: 
> /etc/ld.so.conf contains the line /usr/local/lib, 
> as root I run /sbin/ldconfig.
> Other questions are:
> 1) How I add /usr/local/bin in my execution path?
if u are using bash then edit ~/.bashrc and add export 

> 2) Is It necessary to add /usr/local/bin in my execution path when I 
> use gcc compiler?

only when gcc is in /usr/local/bin and /usr/local/bin is not in $PATH

> Many thanks in advance for your support. Ciao, Roberto


More information about the SDL mailing list