Building SDL apps under Linux

I installed the last version, but I can’t compile apps
Several X11 functions are not found.
With the previous version (the one installed by Mandrake, 1.0.4, I think) I
used sdl config and had no problem, but here I got these problems.
Can you tell the exect command to compile a normal SDL Application? (And an
OpenGL one?)

Anyway, I also tried the Win32 version and, if I set the C-runtime to
multithreade, the compiler says some identifiers are already defined (by the
c library). I tried with multtithreaded dll and it worked.

Marco Iannaccone @Marco_Iannaccone
ICQ: 18748121 Tolkien

“I’ve… seen things you people wouldn’t believe. Attack ships on fire off
the shoulder of Orion.
I watched C-beams… glitter in the dark near the Tanhauser Gate. All
those… moments will be lost… in time…, like… tears… in… rain.”

FAQ it.comp.lang.c++: http://www.programmazione.it/linguaggi/c/lang_faq.htm
FAQ it.comp.lang.c: http://www.programmazione.it/linguaggi/c/itcomplangc.htm> ----- Original Message -----

From: slouken@devolution.com (Sam Lantinga)
To:
Sent: Tuesday, September 05, 2000 4:52 PM
Subject: Re: [SDL] Decision C / C++ ?

Hi Sam !
Again I have a stupid question :slight_smile: I am just asking myself, why you
decided to program SDL in C, instead of C++. Wouldn’t it be more
comfortable using classes on SDL_Surfaces ?
Was it a decision caused by outer demands, personal preferences or
performance ?

In answer to your question, when I started SDL C++ wasn’t completely
implemented or available on many platforms that I wanted SDL to support.
I wanted SDL to run on as many platforms as possible. Since then, I’ve
made SDL work great in C++ code, but the core is still good clean C.

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Op Thu, 28 Sep 2000, Marco Iannaccone schreef:

I installed the last version, but I can’t compile apps
Several X11 functions are not found.
With the previous version (the one installed by Mandrake, 1.0.4, I think) I
used sdl config and had no problem, but here I got these problems.
Can you tell the exect command to compile a normal SDL Application? (And an
OpenGL one?)

are you sure you called ./configure --prefix=/usr ?
default is /usr/local and mandrake installed sdl in /usr as base dir.
It is possible for the sdl programs you tried to compile are still
linking and using the header files of 1.0.4.
To check this, use which sdl-config and see if there is another
sdl-config in /usr/local/bin.

For a normal SDL program use somthing like:

gcc -Wall -g -o prog main.c sdl-config --cflags sdl-config --libs

For a OpenGL SDL program add the -lGL -lGLU options. Maybe even a pointer
to where the libs are with -L/usr/X11R6/lib.

Greets,
John

are you sure you called ./configure --prefix=/usr ?
default is /usr/local and mandrake installed sdl in /usr as base dir.
It is possible for the sdl programs you tried to compile are still
linking and using the header files of 1.0.4.
To check this, use which sdl-config and see if there is another
sdl-config in /usr/local/bin.
I was using the rmp (develop package).
Anyway, I downloaded the source version, compiled the way you told me, and
it works!!!
Thanx!

Marco Iannaccone @Marco_Iannaccone
ICQ: 18748121 Tolkien

“I’ve… seen things you people wouldn’t believe. Attack ships on fire off
the shoulder of Orion.
I watched C-beams… glitter in the dark near the Tanhauser Gate. All
those… moments will be lost… in time…, like… tears… in… rain.”

FAQ it.comp.lang.c++: http://www.programmazione.it/linguaggi/c/lang_faq.htm
FAQ it.comp.lang.c: http://www.programmazione.it/linguaggi/c/itcomplangc.htmFrom: blade_@dds.nl (John van der Kamp)

I was using the rmp (develop package).

Where are the X11 headers found in your distribution?

Anyway, I downloaded the source version, compiled the way you told me, and
it works!!!

Great.
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

I was using the rmp (develop package).

Where are the X11 headers found in your distribution?
The standard location. /usr/X11R6/include …

Marco Iannaccone @Marco_Iannaccone
ICQ: 18748121 Tolkien

“I’ve… seen things you people wouldn’t believe. Attack ships on fire off
the shoulder of Orion.
I watched C-beams… glitter in the dark near the Tanhauser Gate. All
those… moments will be lost… in time…, like… tears… in… rain.”

FAQ it.comp.lang.c++: http://www.programmazione.it/linguaggi/c/lang_faq.htm
FAQ it.comp.lang.c: http://www.programmazione.it/linguaggi/c/itcomplangc.htm> ----- Original Message -----

From: slouken@devolution.com (Sam Lantinga)
To:
Sent: Friday, September 29, 2000 4:51 PM
Subject: Re: [SDL] Building SDL apps under Linux

I was using the rmp (develop package).

Where are the X11 headers found in your distribution?

Anyway, I downloaded the source version, compiled the way you told me,
and

it works!!!

Great.
-Sam Lantinga, Lead Programmer, Loki Entertainment Software