How to compile

Hye, I am very interest by the SDL, so I Downloaded it and install it, now I would
like to compile the test files with gcc but I have this message when I write gcc
-L/usr/lib/libSDL.a testver.c

/tmp/ccQDps2D.o: In function main': /tmp/ccQDps2D.o(.text+0xc): undefined reference toSDL_Init’
/tmp/ccQDps2D.o(.text+0x1d): undefined reference to SDL_GetError' /tmp/ccQDps2D.o(.text+0x70): undefined reference toSDL_Linked_Version(void)’
/tmp/ccQDps2D.o(.text+0x7d): undefined reference to SDL_Linked_Version(void)' /tmp/ccQDps2D.o(.text+0x8a): undefined reference toSDL_Linked_Version(void)’
/tmp/ccQDps2D.o(.text+0xb8): undefined reference to `SDL_Quit’
collect2: ld returned 1 exit status

Could any one help me?

Thanks a lot

Hye, I am very interest by the SDL, so I Downloaded it and install it, now I would
like to compile the test files with gcc but I have this message when I write gcc
-L/usr/lib/libSDL.a testver.c

Look at the FAQ:
http://www.libsdl.org/faq/FAQ-Linux.html#LINUX_2

-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Masson Fran?ois wrote:

Hye, I am very interest by the SDL, so I Downloaded it and install it, now I would
like to compile the test files with gcc but I have this message when I write gcc
-L/usr/lib/libSDL.a testver.c

I’m not sure, 'cos I use autoconf and automake, but I think it should be
:

gcc -lpthread -L/usr/lib -lSDL

and you may have to change the

#include “SDL.h”

into:

#ifndef _SDL_H
#include <SDL/SDL.h>
#endif//SDL_H

(I am not sure about the last thing, but when I do not do this, I always
get some compiling errors…)

CyA

Sascha

Thank of lot for your aswers, they have helpt me a lot. Now I have another problem,
when I execute a test program, I have the following message Couldn’t initialize SDL: No
available video device
Could you help me again?
NB: I have a 3dfx

Thank you

Fran?ois

What enviroment are you running it under? are you in X? X is the
easiest way to run an SDL program. You can just run it from an xterm.
It will just create a window and work in that (unless you give it
SDL_FULLSCREEN).

-ArthurFrom: wonderjacky@wanadoo.fr (Francois Masson)
Subject: Re: [SDL] How to compile
Date: Mon, 09 Oct 2000 23:24:25 +0200

Thank of lot for your aswers, they have helpt me a lot. Now I have another problem,
when I execute a test program, I have the following message Couldn’t initialize SDL: No
available video device
Could you help me again?
NB: I have a 3dfx

Thank you

Fran?ois

I am running my SDL program from an xterm in KDE. I still have the message
Couldn’t initialize SDL: No available video device
What can I do?

Fran?ois> What enviroment are you running it under? are you in X? X is the

easiest way to run an SDL program. You can just run it from an xterm.
It will just create a window and work in that (unless you give it
SDL_FULLSCREEN).

-Arthur

From: Masson Fran?ois <@Francois_Masson>
Subject: Re: [SDL] How to compile
Date: Mon, 09 Oct 2000 23:24:25 +0200

Thank of lot for your aswers, they have helpt me a lot. Now I have another problem,
when I execute a test program, I have the following message Couldn’t initialize SDL: No
available video device
Could you help me again?
NB: I have a 3dfx

Thank you

Fran?ois

I am running my SDL program from an xterm in KDE. I still have the message
Couldn’t initialize SDL: No available video device
What can I do?

Can you run another xterm from that xterm?
What’s the output of “echo $DISPLAY” ?

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

Yes, I can open an xterm from that xterm and the output of “echo $DISPLAY” is
:0

Thanks for helping me

Fran?ois

Sam Lantinga a ?crit :> > I am running my SDL program from an xterm in KDE. I still have the message

Couldn’t initialize SDL: No available video device
What can I do?

Can you run another xterm from that xterm?
What’s the output of “echo $DISPLAY” ?

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

Did you install the X11 headers? I had the same problem when I compiled SDL
fresh from the source. But I forgot to install the xdevel package and I didn’t
watch the configure output. SDL compiled but when running my app nothing happend
but “No available video device.”.

Ciao
Thomas KrennwallnerOn Wed, Oct 11, 2000 at 11:39:30AM +0200, Masson Fran?ois wrote:

I am running my SDL program from an xterm in KDE. I still have the message
Couldn’t initialize SDL: No available video device
What can I do?

Fran?ois

What enviroment are you running it under? are you in X? X is the
easiest way to run an SDL program. You can just run it from an xterm.
It will just create a window and work in that (unless you give it
SDL_FULLSCREEN).

-Arthur

From: Masson Fran?ois
Subject: Re: [SDL] How to compile
Date: Mon, 09 Oct 2000 23:24:25 +0200

Thank of lot for your aswers, they have helpt me a lot. Now I have another problem,
when I execute a test program, I have the following message Couldn’t initialize SDL: No
available video device
Could you help me again?
NB: I have a 3dfx

Thank you

Fran?ois