SDL, error

Hi ,

         I am writting a game for Linux/Unix. My target has been

ggi but I am beginning to agree with Linus’s comments on
X being the best place for graphics. So, I would like to
port over to SDL. My problems is that (after building the
lib, yes it builds) running one of the test programs exits
and returns …

[root at localhost test]# ./graywin
Couldn’t initialize SDL: Failed loading libSDLx11.so:
/lib/libSDLx11.so: undefined symbol: pthread_create

I am on Linux/RH5.0, and I do have the Xextensions for xf86dga ect…

 Let me know if you could help .   Thanks Sean

Anyone want to write a FAQ? If so, this should go into it. :slight_smile:

[root at localhost test]# ./graywin
Couldn’t initialize SDL: Failed loading libSDLx11.so:
/lib/libSDLx11.so: undefined symbol: pthread_create

You need to define -D_REENTRANT in the CFLAGS and add -lpthread to the
link line for the application.
(There’s a note to that effect when you build SDL)

Take a look at the comments in the Makefile in the test directory.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Ok , Thanks. I thought that referred to user apps and that
the config would have taken care of it for the test apps.

           Sean

Sam Lantinga wrote:> Anyone want to write a FAQ? If so, this should go into it. :slight_smile:

[root at localhost test]# ./graywin
Couldn’t initialize SDL: Failed loading libSDLx11.so:
/lib/libSDLx11.so: undefined symbol: pthread_create

You need to define -D_REENTRANT in the CFLAGS and add -lpthread to the
link line for the application.
(There’s a note to that effect when you build SDL)

Take a look at the comments in the Makefile in the test directory.

See ya!
-Sam Lantinga (slouken at devolution.com)


Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Anyone want to write a FAQ? If so, this should go into it. :slight_smile:

I personally recommend FAQ-O-Matic for this job: it makes life easier for
everyone involved - as long as it is updated often.
sorry, no URL - but it can be got to from www.linuxppc.org

njhOn Tue, 26 May 1998, Sam Lantinga wrote:

Anyone want to write a FAQ? If so, this should go into it. :slight_smile:

I personally recommend FAQ-O-Matic for this job: it makes life easier for
everyone involved - as long as it is updated often.
sorry, no URL - but it can be got to from www.linuxppc.org

Hmm… nobody remembers the URL for some reason. They explained the
reason for that in the FAQ-O-Matic…

Seriously now, a FAQ-O-Matic is very suitable for something as big as
LinuxPPC, but at the moment, SDL doesn’t need a FAQ, it just needs to have
a BLURB file included with it (You can figure out what would go in that
:slight_smile: and a README file, which includes things like the pthreads note.

Maybe an online suggestions box would be nice, which will forward a
message to a mailing-list, who filter the suggestions out as they come
through. Just a thought, anyway. (And REALLY easy to set up)

Michael Samuel,

Surf-Net City - Internet Cafe and Internet Service Providers
Phone: +61 3 9593-9977
E-Mail:
WWW: http://www.surfnetcity.com.au/~michael/On Wed, 27 May 1998, Nathan Hurst wrote:

On Tue, 26 May 1998, Sam Lantinga wrote: