Problem with SDL!

hi ppls,
i’m a new programmer in linux platform.my provblem with the SDL
library.i downloaded the SDL source file yesterday and when i tried to first
use it in a very simple porgram.but when i tried to compile with gcc with
the follwing command i got the followinf messages.i can figure out what is
the fault.can please any one explain whats the reason for this

gcc sdl.c -L/usr/local/lib -lSDL -o out

/usr/local/lib/libSDL.so:undefined reference to ‘pthread_create’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_cancel’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_destroy’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_wait’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_post’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_init’
/usr/local/lib/libSDL.so:undefined reference to ‘phread_sigmask’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_trywait’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_mutexattr_init’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_getvalue’
/usr/local/lib/libSDL.so:undefined reference to 'pthread_join’
collet2:ld returned 1 exit status

thanx everyone!_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

replace this with:

gcc sdl.c sdl-config --cflags --libs -o out

(Those "`"s are back-ticks; e.g., typically on the “~” key. NOT "’"s.)

-bill!On Tue, Sep 30, 2003 at 01:39:41AM +0600, Buno Raja wrote:

gcc sdl.c -L/usr/local/lib -lSDL -o out

You must include the lib pthread in the compilation line.
gcc sdl.c -L/usr/local/lib -lSDL -o out -lpthread

A cleaner way : gcc sdl.c sdl-config --clfags --libs -o out

Julien> ----- Original Message -----

From: sapnabaz@hotmail.com (Buno Raja)
To:
Sent: Monday, September 29, 2003 9:39 PM
Subject: [SDL] problem with SDL!!

hi ppls,
i’m a new programmer in linux platform.my provblem with the SDL
library.i downloaded the SDL source file yesterday and when i tried to
first
use it in a very simple porgram.but when i tried to compile with gcc with
the follwing command i got the followinf messages.i can figure out what is
the fault.can please any one explain whats the reason for this

gcc sdl.c -L/usr/local/lib -lSDL -o out

/usr/local/lib/libSDL.so:undefined reference to ‘pthread_create’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_cancel’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_destroy’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_wait’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_post’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_init’
/usr/local/lib/libSDL.so:undefined reference to ‘phread_sigmask’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_trywait’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_mutexattr_init’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_getvalue’
/usr/local/lib/libSDL.so:undefined reference to 'pthread_join’
collet2:ld returned 1 exit status

thanx everyone!


Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Try linking with the pthreads library:
gcc sdl.c -L/usr/local/lib -lSDL -o out -lpthreadOn Tue, Sep 30, 2003 at 01:39:41AM +0600, Buno Raja wrote:

hi ppls,
i’m a new programmer in linux platform.my provblem with the SDL
library.i downloaded the SDL source file yesterday and when i tried to first
use it in a very simple porgram.but when i tried to compile with gcc with
the follwing command i got the followinf messages.i can figure out what is
the fault.can please any one explain whats the reason for this

gcc sdl.c -L/usr/local/lib -lSDL -o out

/usr/local/lib/libSDL.so:undefined reference to ‘pthread_create’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_cancel’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_destroy’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_wait’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_post’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_init’
/usr/local/lib/libSDL.so:undefined reference to ‘phread_sigmask’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_trywait’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_mutexattr_init’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_getvalue’
/usr/local/lib/libSDL.so:undefined reference to 'pthread_join’
collet2:ld returned 1 exit status


Ivan Stankovic, @Ivan_Stankovic

dear julien,
thank you so much for this kind help.actually i’m trying to
get over the learning curve of game programming with a book.but in that it
was not written to inluce that lib pthread.i spent quite a few hours with
that thing and thanx very much for helping:).

rip>From: “Julien Pauty”

Reply-To: sdl at libsdl.org
To:
Subject: Re: [SDL] problem with SDL!!
Date: Mon, 29 Sep 2003 22:15:03 +0200

You must include the lib pthread in the compilation line.
gcc sdl.c -L/usr/local/lib -lSDL -o out -lpthread

A cleaner way : gcc sdl.c sdl-config --clfags --libs -o out

Julien

----- Original Message -----
From: “Buno Raja” <@Buno_Raja>
To:
Sent: Monday, September 29, 2003 9:39 PM
Subject: [SDL] problem with SDL!!

hi ppls,
i’m a new programmer in linux platform.my provblem with the SDL
library.i downloaded the SDL source file yesterday and when i tried to
first
use it in a very simple porgram.but when i tried to compile with gcc
with
the follwing command i got the followinf messages.i can figure out what
is
the fault.can please any one explain whats the reason for this

gcc sdl.c -L/usr/local/lib -lSDL -o out

/usr/local/lib/libSDL.so:undefined reference to ‘pthread_create’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_cancel’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_destroy’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_wait’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_post’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_init’
/usr/local/lib/libSDL.so:undefined reference to ‘phread_sigmask’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_trywait’
/usr/local/lib/libSDL.so:undefined reference to ‘pthread_mutexattr_init’
/usr/local/lib/libSDL.so:undefined reference to ‘sem_getvalue’
/usr/local/lib/libSDL.so:undefined reference to 'pthread_join’
collet2:ld returned 1 exit status

thanx everyone!


Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


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