I get the following errors:

I am completely new here. May be I am asking some trivial questions. But
if any one can help, I’ll be thankful.

I wrote a simple code:

#include “/home/pati/SDL-1.2.2/include/SDL.h”

int main()
printf(“Could not initialize SDL: \n”);


and tried to compile with:
gcc -I/usr/local/include/SDL -o test1 test1.c -O2 -lSDL -lpthread

It gave me the following errors:

/usr/i486-suse-linux/bin/ld: warning: libartsc.so.0, needed by
/usr/local/lib/libSDL.so, not found (try using --rpath)
/usr/local/lib/libSDL.so: undefined reference to arts_stream_get' /usr/local/lib/libSDL.so: undefined reference toarts_init’
/usr/local/lib/libSDL.so: undefined reference to arts_play_stream' /usr/local/lib/libSDL.so: undefined reference toarts_stream_set’
/usr/local/lib/libSDL.so: undefined reference to arts_close_stream' /usr/local/lib/libSDL.so: undefined reference toarts_write’
collect2: ld returned 1 exit status

Can anyone help?

With regards,

you get a link error !
you either have to compile with gcc -Lsdl_pah -lSDL …
or fix our LIBRARY_PATH to point also on directory containing
libSDL.so (this will compile but not run, fix also LD_LIBRARY_PATH)

BTW it’s not very beautifull to write
#include “/home/pati/SDL-1.2.2/include/SDL.h”

it’s better to have
gcc -I/home/pati/SDL-1.2.2/include/ …
and #include <SDL.h>

or change your C_INCLUDE_PATH env variable…

hopes this would help.