Help me linux

I have a problem using SDL, when I try to compile a .cpp program i get some
errors when the function SDL_Init is invoced, they are like “reference
SDL_Init not define”, and i don`t know what to do. I ran the following
commands and the results ar show belong:

[root at localhost root]# which sdl-config

/usr/local/bin/sdl-config

[root at localhost root]# sdl-config --version

1.2.8

[root at localhost root]# locate libSDL

/usr/lib/libSDL-1.2.so.0.0.5

/usr/lib/libSDL-1.2.so.0

/usr/lib/libSDL_mixer-1.2.so.0.2.2

/usr/lib/libSDL_mixer-1.2.so.0

/usr/lib/libSDL_net-1.2.so.0.0.4

/usr/lib/libSDL_net-1.2.so.0

/usr/lib/libSDL_image-1.2.so.0

/usr/lib/libSDLmain.a

/usr/lib/libSDL_image-1.2.so.0.1.1

/usr/lib/libSDL_mixer.a

/usr/lib/libSDL_mixer.la

/usr/lib/libSDL_mixer.so

/usr/lib/libSDL_net.a

/usr/lib/libSDL_net.so

/usr/lib/libSDL.a

/usr/lib/libSDL.la

/usr/lib/libSDL.so

/usr/lib/libSDL_image.a

/usr/lib/libSDL_image.so

root at localhost root]# tail SDL-1.2.8/config.log

#define PACKAGE_STRING “”

#define PACKAGE_TARNAME “”

#define PACKAGE_VERSION “”

#define STDC_HEADERS 1

#define VERSION “1.2.8”

#endif

#ifdef __cplusplus

extern “C” void std::exit (int) throw (); using std::exit;

configure: exit 0

Thanks_________________________________________________________________
MSN Amor: busca tu ? naranja http://latam.msn.com/amor/

What is the command you’re using to compile with?
What exact error is it producing?

-bill!On Mon, Jun 06, 2005 at 05:54:56PM -0500, david monta wrote:

I have a problem using SDL, when I try to compile a .cpp program i get some
errors when the function SDL_Init is invoced, they are like “reference
SDL_Init not define”, and i don`t know what to do. I ran the following
commands and the results ar show belong:

david monta wrote:

I have a problem using SDL, when I try to compile a .cpp program i get
some errors when the function SDL_Init is invoced, they are like
"reference SDL_Init not define", and i don`t know what to do. I ran
the following commands and the results ar show belong:

What’s the actual error instead of just a description of it? (Copy &
Paste :slight_smile: )
How are you compiling? (See bellow)
Are you linking against the library? (See bellow)

From what I can tell you’re describing a linking problem, which is most
often caused by not linking the library :-).

This is what your compile command should look like (IIRC, been awhile
since I’ve used SDL on linux):

single line:
gcc test.cpp -o test sdl-config --cflags --libs

or multi line:
gcc -c test.cpp -o test.o sdl-config --cflags
gcc test.o -o test sdl-config --libs




>From: “Michael B. Edwin Rickert”
<panda at industry.no-ip.com>
>Reply-To: “A list for
developers using the SDL library. (includesSDL-announce)”
<sdl at libsdl.org>
>To: “A list for developers using the SDL
library. (includes SDL-announce)”<sdl at libsdl.org>
>Subject:
Re: [SDL] Help me linux
>Date: Mon, 06 Jun 2005 16:46:10
-0700
>
>david monta wrote:
>
>>I have a problem
using SDL, when I try to compile a .cpp program i
>>get some
errors when the function SDL_Init is invoced, they are
>>like
"reference SDL_Init not define", and i dont know what to do. <br>&gt;&gt;I ran the following commands and the results ar show belong:<br>&gt;<br>&gt;What's the actual error instead of just a description of it? (Copy &amp; <br>&gt;Paste :-) )<br>&gt;How are you compiling? (See bellow)<br>&gt;Are you linking against the library? (See bellow)<br>&gt;<br>&gt;From what I can tell you're describing a linking problem, which is <br>&gt;most often caused by not linking the library :-).<br>&gt;<br>&gt;This is what your compile command should look like (IIRC, been <br>&gt;awhile since I've used SDL on linux):<br>&gt;<br>&gt;single line:<br>&gt;gcc test.cpp -o testsdl-config
–cflags --libs<br>&gt;<br>&gt;or multi line:<br>&gt;gcc -c test.cpp -o test.osdl-config --cflags<br>&gt;gcc test.o -o testsdl-config
–libs`
>
>_______________________________________________
>SDL
mailing
list
>SDL at libsdl.org
>http://www.libsdl.org/mailman/listinfo/sdl

Thank you so much I was compiling in the wrong way, I’m just learning how to
use linux, I used the commands and works._________________________________________________________________
Charla con tus amigos en l?nea mediante MSN Messenger:
http://messenger.latam.msn.com/

david monta wrote:

Thank you so much I was compiling in the wrong way, I’m just learning
how to use linux, I used the commands and works.

No problem. Thanks for inadvertently pointing out I had frogotten to
disable HTML outputting on my mail client by quoting the HTML-junkized
crap :-).