"undefined reference" problem

Hi all, i’m new to this forum, SDL and linux.
I already posted my question on
Gamedev.net(http://www.gamedev.net/community/forums/topic.asp?topic_id=260057)
about a week ago, but i still can solve the problem.

I’m trying to make a simple SDL program under RedHat
Linux9, the SDL include and library files are already
installed properly(i even try to reinstall them but it
didn’t help). This is the code itself:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream.h>
#include <stdlib.h>
#include <SDL/SDL.h>

int main(int argc, char *argv[])
{
cout << “Hello, World!” << endl;
if( SDL_Init( SDL_INIT_VIDEO ) < 0 )
{
cout<< “SDL Initialization failed”<<endl;
exit(1);
}
atexit(SDL_Quit);

return EXIT_SUCCESS;
}

And this is how i’m building the executable:
g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.

But i’m having these errors:
main.o(.text+0x2b): In function main': : undefined reference toSDL_Init’
main.o(.text+0x59): In function main': : undefined reference toSDL_Quit’
collect2: ld returned 1 exit status

Please can i get some help here?

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.

do this: sdl-configs --cflags --libs

you use --cflags for compiling, --libs for linking. your invocation of
gcc (g++) is both compiling and linking, so use both.

  • Donny VisznekiOn Aug 3, 2004, at 3:36 AM, remi tassing wrote:

— Donny Viszneki a ?crit?:

do this: sdl-configs --cflags --libs

you use --cflags for compiling, --libs for linking.
your invocation of
gcc (g++) is both compiling and linking, so use
both.

  • Donny Viszneki

It didn’t solve the problem

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

— Donny Viszneki a ?crit?:

do this: sdl-configs --cflags --libs

you use --cflags for compiling, --libs for linking.
your invocation of
gcc (g++) is both compiling and linking, so use
both.

  • Donny Viszneki

It didn’t solve the problem

What exactly was the build command you issued after my reply?

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les
nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger
gratuitement sur http://fr.messenger.yahoo.com


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

  • Donny VisznekiOn Aug 3, 2004, at 3:54 AM, remi tassing wrote:

— Donny Viszneki a ?crit?:

What exactly was the build command you issued after
my reply?
I wrote:
g++ -Wall -Wno-deprecated sdl-config --cflags --libs
-o main main.cpp

since you used the ‘s’ in your post, i tried also:
g++ -Wall -Wno-deprecated sdl-configs --cflags --libs -o main main.cpp
But i think it was a mistake!

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

remi tassing wrote:

— Donny Viszneki a ?crit :

What exactly was the build command you issued after
my reply?

I wrote:
g++ -Wall -Wno-deprecated sdl-config --cflags --libs
-o main main.cpp

since you used the ‘s’ in your post, i tried also:
g++ -Wall -Wno-deprecated sdl-configs --cflags --libs -o main main.cpp
But i think it was a mistake!

Can you type “which sdl-config” at a commandline?
If you installed it twice it might be using an incorrect one which
causes the linking to fail. The problem seems to occur when it comes
time to link against the static libraries.

— Aaron Deadman a ?crit?:

Can you type “which sdl-config” at a commandline?
If you installed it twice it might be using an
incorrect one which
causes the linking to fail. The problem seems to
occur when it comes
time to link against the static libraries.
/usr/bin/sdl-config

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

Check the output of sdl-config --libs and see if the output looks
correct to you. Perhaps you could even search your hard drive(s) for
more copies of them to see if the above suggestion could be relevant.On Aug 3, 2004, at 8:05 AM, remi tassing wrote:

— Aaron Deadman a ?crit?:

Can you type “which sdl-config” at a commandline?
If you installed it twice it might be using an
incorrect one which
causes the linking to fail. The problem seems to
occur when it comes
time to link against the static libraries.
/usr/bin/sdl-config

remi tassing wrote:

Hi all, i’m new to this forum, SDL and linux.
I already posted my question on
Gamedev.net(http://www.gamedev.net/community/forums/topic.asp?topic_id=260057)
about a week ago, but i still can solve the problem.

I’m trying to make a simple SDL program under RedHat
Linux9, the SDL include and library files are already
installed properly(i even try to reinstall them but it
didn’t help). This is the code itself:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream.h>
#include <stdlib.h>
#include <SDL/SDL.h>

The portable way of including SDL.h is the following :
#include “SDL.h”

Stephane

— Donny Viszneki a ?crit?:

Check the output of sdl-config --libs and see if the
output looks
correct to you. Perhaps you could even search your
hard drive(s) for
more copies of them to see if the above suggestion
could be relevant.

The output of sdl-config --libs gives me:
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread .
Is there any problem?

— Stephane Marchesin

The portable way of including SDL.h is the following
:
#include “SDL.h”

Stephane

I tried that but it didn’t work.

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

— Donny Viszneki a ?crit?:

Check the output of sdl-config --libs and see if the
output looks
correct to you. Perhaps you could even search your
hard drive(s) for
more copies of them to see if the above suggestion
could be relevant.

The output of sdl-config --libs gives me:
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread .
Is there any problem?

Actually after thinking about the earlier suggestion by Aaron Deadman,
I really doubt that could be the problem.

— Stephane Marchesin

The portable way of including SDL.h is the following
:
#include “SDL.h”

Stephane

I tried that but it didn’t work.

If that (#include “SDL.h”) didn’t work when you were compiling with the
sdl-config --cflags then there is something wrong with your SDL
installation, and that is possibly the root of the problems you’re
having now.On Aug 3, 2004, at 2:58 PM, remi tassing wrote:


On Aug 3, 2004, at 3:44 AM, Donny Viszneki wrote:

On Aug 3, 2004, at 3:36 AM, remi tassing wrote:

g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.

do this: sdl-configs --cflags --libs

you use --cflags for compiling, --libs for linking. your invocation of
gcc (g++) is both compiling and linking, so use both.

I’m sorry, when I wrote that I somehow didn’t even see that you DID
invoke sdl-config with the --libs option. I guess it’s because I never
saw it invoked that way (twice in the same command line.)

I really recommend reinstalling SDL, from CVS if it’s not too much
trouble. It’s probably not worthwhile for us to try and figure out what
the problem is only to find out that it’s been fixed in the past. (Or
maybe you ARE running the latest CVS version.)

  • Donny Viszneki

remi tassing wrote:

— Donny Viszneki a ?crit :

Check the output of sdl-config --libs and see if the
output looks
correct to you. Perhaps you could even search your
hard drive(s) for
more copies of them to see if the above suggestion
could be relevant.

The output of sdl-config --libs gives me:
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread .
Is there any problem?

— Stephane Marchesin

The portable way of including SDL.h is the following
:
#include “SDL.h”

Stephane

I tried that but it didn’t work.

And you don’t have an error message ? Or is the message the same as
before ? Please, be precise when describing your errors. That helps
others helping you. Without precise error messages, we can only guess.

Stephane

remi tassing wrote:

Hi all, i’m new to this forum, SDL and linux.
I already posted my question on
Gamedev.net(http://www.gamedev.net/community/forums/topic.asp?topic_id=260057)
about a week ago, but i still can solve the problem.

I’m trying to make a simple SDL program under RedHat
Linux9, the SDL include and library files are already
installed properly(i even try to reinstall them but it
didn’t help). This is the code itself:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream.h>
#include <stdlib.h>
#include <SDL/SDL.h>

int main(int argc, char *argv[])
{
cout << “Hello, World!” << endl;
if( SDL_Init( SDL_INIT_VIDEO ) < 0 )
{
cout<< “SDL Initialization failed”<<endl;
exit(1);
}
atexit(SDL_Quit);

return EXIT_SUCCESS;
}

And this is how i’m building the executable:
g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.

But i’m having these errors:
main.o(.text+0x2b): In function main': : undefined reference toSDL_Init’
main.o(.text+0x59): In function main': : undefined reference toSDL_Quit’
collect2: ld returned 1 exit status

Please can i get some help here?

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com


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

I believe the problem is related to your command line ordering. GCC
doesn’t reverse link, so if you pass it a library before the library is
used then GCC will ignore that library (people correct me if I’m wrong).
Try this for the command:

g++ -o main main.cpp -Wall -Wno-deprecated sdl-config --cflags sdl-config --libs

the only change I made was to move up the positioning of your source file to before you pass in the SDL libs

brian

I believe the problem is related to your command line ordering. GCC
doesn’t reverse link, so if you pass it a library before the library
is used then GCC will ignore that library (people correct me if I’m
wrong). Try this for the command:

g++ -o main main.cpp -Wall -Wno-deprecated sdl-config --cflags
sdl-config --libs

the only change I made was to move up the positioning of your source
file to before you pass in the SDL libs

brian

That is simply not true. In fact, in older versions of GCC, this exact
opposite is true (some options would only affect files listed AFTER the
option.)

  • Donny VisznekiOn Aug 3, 2004, at 7:05 PM, Brian Kropf wrote:

Donny Viszneki wrote:

I believe the problem is related to your command line ordering. GCC
doesn’t reverse link, so if you pass it a library before the library
is used then GCC will ignore that library (people correct me if I’m
wrong). Try this for the command:

g++ -o main main.cpp -Wall -Wno-deprecated sdl-config --cflags
sdl-config --libs

the only change I made was to move up the positioning of your source
file to before you pass in the SDL libs

brian

That is simply not true. In fact, in older versions of GCC, this exact
opposite is true (some options would only affect files listed AFTER
the option.)

  • Donny Viszneki

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

then the Mingw GCC is pretty screwed! It does not compile if I specify
the “-o testalpha testalpha.c” after the libs.

jessica at CAVORTIANVILLE /src/SDL12/test
$ gcc -Wall sdl-config --cflags sdl-config --libs -o testalpha
testalpha.c
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x4c):testalpha.c:
undefined reference to SDL_CreateRGBSurface' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xdb):testalpha.c: undefined reference toSDL_MapRGBA’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x2b1):testalpha.c:
undefined reference to SDL_SetAlpha' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x31f):testalpha.c: undefined reference toSDL_GetTicks’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x343):testalpha.c:
undefined reference to SDL_UpperBlit' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x348):testalpha.c: undefined reference toSDL_GetTicks’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x365):testalpha.c:
undefined reference to SDL_UpdateRects' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x394):testalpha.c: undefined reference toSDL_RWFromFile’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x3a4):testalpha.c:
undefined reference to SDL_LoadBMP_RW' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x417):testalpha.c: undefined reference toSDL_SetColorKey’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x424):testalpha.c:
undefined reference to SDL_DisplayFormat' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x434):testalpha.c: undefined reference toSDL_FreeSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x4bb):testalpha.c:
undefined reference to SDL_CreateRGBSurface' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x4f7):testalpha.c: undefined reference toSDL_FreeSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x510):testalpha.c:
undefined reference to SDL_DisplayFormat' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x520):testalpha.c: undefined reference toSDL_FreeSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x554):testalpha.c:
undefined reference to SDL_FreeSurface' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x69f):testalpha.c: undefined reference toSDL_UpperBlit’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x6db):testalpha.c:
undefined reference to SDL_GetMouseState' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x7ef):testalpha.c: undefined reference toSDL_SetAlpha’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x826):testalpha.c:
undefined reference to SDL_UpperBlit' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x85d):testalpha.c: undefined reference toSDL_UpperBlit’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x877):testalpha.c:
undefined reference to SDL_UpdateRects' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x8b3):testalpha.c: undefined reference toSDL_UpperBlit’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x936):testalpha.c:
undefined reference to SDL_UpperBlit' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x96d):testalpha.c: undefined reference toSDL_UpperBlit’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x987):testalpha.c:
undefined reference to SDL_UpdateRects' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x9e0):testalpha.c: undefined reference toSDL_GetVideoInfo’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xb75):testalpha.c:
undefined reference to SDL_SetVideoMode' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xbbe):testalpha.c: undefined reference toSDL_LockSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xcc0):testalpha.c:
undefined reference to SDL_MapRGB' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xd15):testalpha.c: undefined reference toSDL_UnlockSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xd40):testalpha.c:
undefined reference to SDL_UpdateRect' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xd8a):testalpha.c: undefined reference toSDL_FreeSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xe60):testalpha.c:
undefined reference to SDL_UpperBlit' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xe7a):testalpha.c: undefined reference toSDL_FillRect’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xedd):testalpha.c:
undefined reference to SDL_SetClipRect' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xee2):testalpha.c: undefined reference toSDL_GetTicks’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xf36):testalpha.c:
undefined reference to SDL_GetTicks' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xf5f):testalpha.c: undefined reference toSDL_Delay’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0xf70):testalpha.c:
undefined reference to SDL_PollEvent' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x102d):testalpha.c: undefined reference toSDL_FillRect’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x1047):testalpha.c:
undefined reference to SDL_UpdateRects' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x1063):testalpha.c: undefined reference toSDL_FreeSurface’
C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x1070):testalpha.c:
undefined reference to SDL_FreeSurface' C:/DOCUME~1/jessica/LOCALS~1/Temp/ccCibaaa.o(.text+0x107d):testalpha.c: undefined reference toSDL_FreeSurface’
collect2: ld returned 1 exit status

jessica at CAVORTIANVILLE /src/SDL12/test
$ gcc -o testalpha testalpha.c -Wall sdl-config --cflags sdl-config --libs

jessica at CAVORTIANVILLE /src/SDL12/test
$> On Aug 3, 2004, at 7:05 PM, Brian Kropf wrote:

— Donny Viszneki a ?crit?:

— Donny Viszneki a
?crit?:

Check the output of sdl-config --libs and see if
the

output looks
correct to you. Perhaps you could even search
your

hard drive(s) for
more copies of them to see if the above
suggestion

could be relevant.

The output of sdl-config --libs gives me:
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread .
Is there any problem?

Actually after thinking about the earlier suggestion
by Aaron Deadman,
I really doubt that could be the problem.

— Stephane Marchesin

The portable way of including SDL.h is the
following

:
#include “SDL.h”

Stephane

I tried that but it didn’t work.

If that (#include “SDL.h”) didn’t work when you were
compiling with the
sdl-config --cflags then there is something wrong
with your SDL
installation, and that is possibly the root of the
problems you’re
having now.

That’s what i was thinking too, cause i don’t have the
SDL include files in the current directory.> On Aug 3, 2004, at 2:58 PM, remi tassing wrote:

On Aug 3, 2004, at 3:44 AM, Donny Viszneki wrote:

On Aug 3, 2004, at 3:36 AM, remi tassing wrote:

g++ -Wall sdl-config --cflags sdl-config --libs

-Wno-deprecated -o main main.cpp.

do this: sdl-configs --cflags --libs

you use --cflags for compiling, --libs for
linking. your invocation of
gcc (g++) is both compiling and linking, so use
both.

I’m sorry, when I wrote that I somehow didn’t even
see that you DID
invoke sdl-config with the --libs option. I guess
it’s because I never
saw it invoked that way (twice in the same command
line.)

I really recommend reinstalling SDL, from CVS if
it’s not too much
trouble. It’s probably not worthwhile for us to try
and figure out what
the problem is only to find out that it’s been fixed
in the past. (Or
maybe you ARE running the latest CVS version.)

  • Donny Viszneki

Man , i don’t even know what CVS is?

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com

then the Mingw GCC is pretty screwed! It does not compile if I
specify the “-o testalpha testalpha.c” after the libs.

That does sound like a problem. I can’t imagine that they’d miss
something like that, though frankly it wouldn’t surprise me that much.
The last time I tried using mingw, half the programs (including gcc)
couldn’t even tell I was passing them any arguments at all. SDL
developer’s SEEM to prefer cross-compiling to Windows instead of
compiling with mingw while in Windows, but maybe I just imagined that.

  • Donny VisznekiOn Aug 3, 2004, at 11:39 PM, Brian Kropf wrote:

— Donny Viszneki a ?crit?:

If that (#include “SDL.h”) didn’t work when you were
compiling with the
sdl-config --cflags then there is something wrong
with your SDL
installation, and that is possibly the root of the
problems you’re
having now.

That’s what i was thinking too, cause i don’t have the
SDL include files in the current directory.

What “current directory” are you talking about?

Man , i don’t even know what CVS is?

I don’t want to sound like a buzzkill but perhaps you should take the
time to learn some other things before SDL. Either way…

CVS is the Concurrent Versions System. It organizes and serves source
code and keeps a history of revisions. There are plenty of CVS clients
out there. If you’re running any sort of Unix you probably already have
a cvs client (called, appropriately enough, cvs.)

To learn about using a cvs client, Google recommends…
http://www.flat222.org/mac/cvs.html
https://www.cvshome.org/docs/blandy.html

  • Donny VisznekiOn Aug 4, 2004, at 5:14 AM, remi tassing wrote:

A lot of bogus information was given in the threads replying to this.
Let’s get some facts.

  1. Your SDL installation is fine. No need to reinstall or get new
    versions from CVS
  2. When linking statically, the order of the object files and
    libraries is critical. A static library satisfies references only for
    the files before it on the linker command line. This is normal
    behaviour, and yes, it means that you sometimes have to have some libs
    repeated in case there’s a circular dependency, like -lfoo -lbar -lfoo.
    The reason to this is that ld reads the linked files in the order of the
    command line, and when linking statically, references are linked at that
    point. When linking dynamically, the symbols are only checked to see
    that all references are satisfied.On Tue, 2004-08-03 at 10:36, remi tassing wrote:

And this is how i’m building the executable:
g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.


Petri Latvala

— Petri Latvala a
?crit?:> On Tue, 2004-08-03 at 10:36, remi tassing wrote:

And this is how i’m building the executable:
g++ -Wall sdl-config --cflags sdl-config --libs
-Wno-deprecated -o main main.cpp.

A lot of bogus information was given in the threads
replying to this.
Let’s get some facts.

  1. Your SDL installation is fine. No need to
    reinstall or get new
    versions from CVS
  2. When linking statically, the order of the
    object files and
    libraries is critical. A static library satisfies
    references only for
    the files before it on the linker command line. This
    is normal
    behaviour, and yes, it means that you sometimes have
    to have some libs
    repeated in case there’s a circular dependency, like
    -lfoo -lbar -lfoo.
    The reason to this is that ld reads the linked files
    in the order of the
    command line, and when linking statically,
    references are linked at that
    point. When linking dynamically, the symbols are
    only checked to see
    that all references are satisfied.


Petri Latvala

So what do you suggest?

Vous manquez d?espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Cr?ez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. A t?l?charger gratuitement sur http://fr.messenger.yahoo.com