Be wrong when linking libSDL_console.a

hi,everyone
when linking the libSDL_console.a,I have the problem as follows,what’s
wrong with it,and anyone can help me?Thanks very much.

$ make

*** Creating directory structure:
mkdir -p /e/TPTS/Code/mambo3-source-rev160/objectfiles
mkdir -p /e/TPTS/Code/mambo3-source-rev160/run

*** Copying lamps (icons) at its place:
mkdir -p /e/TPTS/Code/mambo3-source-rev160/run/lamps
cp /e/TPTS/Code/mambo3-source-rev160/resources/lamps/*
/e/TPTS/Code/mambo3-source-rev160/run/lamps/

*** Copying sounds at its place:
mkdir -p /e/TPTS/Code/mambo3-source-rev160/run/sounds
cp /e/TPTS/Code/mambo3-source-rev160/resources/sounds/*
/e/TPTS/Code/mambo3-source-rev160/run/sounds/

*** Building mambo3_demo:
g++ -Wall
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_main_demo.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_rs
232_demo.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_key_demo.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_dr
awing_demo.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_math_demo.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/rs232_
win32.o /e/TPTS/Code/mambo3-source-rev160/objectfiles/pixcir.o
/e/TPTS/Code/mambo3-source-rev160/objectfiles/mambo3_tools.o -o /e/
TPTS/Code/mambo3-source-rev160/run/mambo3_demo -mwindows -lmingw32
-L/MinGW/lib -lSDLmain -lSDL -lSDL_console -lSDL_gfx -lSDL_image -lSDL_mixer
D:/mingw/lib/libSDL_console.a(DT_drawtext.o): In function DT_LoadFont': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/DT_drawtext.c:117: undefined reference toSDL_DisplayFormat’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/DT_drawtext.c:131:
undefined reference to SDL_GetVideoSurface ' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/DT_drawtext.c:135: undefined reference toSDL_GetVideoSurface

D:/mingw/lib/libSDL_console.a(DT_drawtext.o): In function DT_DrawText': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/DT_drawtext.c:183: undefined reference toSDL_UpdateRects’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function CON_AlphaGL': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:233: undefined reference toSDL_LockSurface’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:241:
undefined reference to SDL_GetRGBA' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:242: undefined reference toSDL_MapRGBA’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:243:
undefined reference to SDL_GetRGBA' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:248: undefined reference toSDL_UnlockSurface’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function
CON_UpdateConsole': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:273: undefined reference toSDL_MapRGBA’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function CON_Show': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:494: undefined reference toSDL_EnableUNICODE’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function DrawCommandLine': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:642: undefined reference toSDL_GetTicks’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:650:
undefined reference to SDL_GetTicks' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:643: undefined reference toSDL_GetTicks’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function CON_DrawConsole': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:374: undefined reference toSDL_UpdateRects’
D:/mingw/lib/libSDL_console.a(SDL_console.o): In function CON_Init': e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:441: undefined reference toSDL_DisplayFormat’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:443:
undefined reference to SDL_MapRGBA' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:451: undefined reference toSDL_DisplayFormat’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:453:
undefined reference to SDL_MapRGBA' D:/mingw/lib/libSDL_console.a(SDL_console.o): In functionCON_Background’:
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:753:
undefined reference to SDL_DisplayFormat' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:768: undefined reference toSDL_MapRGBA’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:738:
undefined reference to SDL_MapRGBA' D:/mingw/lib/libSDL_console.a(SDL_console.o): In functionCON_Resize’:
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:821:
undefined reference to SDL_DisplayFormat' e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:831: undefined reference toSDL_DisplayFormat’
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:849:
undefined reference to SDL_MapRGBA' D:/mingw/lib/libSDL_console.a(SDL_console.o): In functionCON_Hide’:
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:503:
undefined reference to SDL_EnableUNICODE' D:/mingw/lib/libSDL_console.a(SDL_console.o): In functionCON_Show’:
e:/TPTS/Code/mambo3-source-rev160/sdlconsole-2.1/sdlconsole-2.1/src/SDL_console.c:495:
undefined reference to `SDL_EnableUNICODE’
collect2: ld returned 1 exit status
make: *** [mambo3_demo] Error 1–

Best Regards

Bee

Blog:http://www.delnabla.cn http://www.delnabla.cn/


Hi,On Mon, 07 Dec 2009 21:01:32 +0800, Bee wrote:

hi,everyone
when linking the libSDL_console.a,I have the problem as follows,what’s
wrong with it,and anyone can help me?Thanks very much.
*** Building mambo3_demo:
TPTS/Code/mambo3-source-rev160/run/mambo3_demo -mwindows -lmingw32
-L/MinGW/lib -lSDLmain -lSDL -lSDL_console -lSDL_gfx -lSDL_image
-lSDL_mixer

Change the order of linking. Put -lSDL after all other SDL libraries.
During linking the order of dependancies is reversed, the prerequisites
come last and the SDL add-ons depend on SDL.


Christoph Nelles

E-Mail : @Christoph_Nelles
Jabber : eazrael at evilazrael.net ICQ : 78819723

PGP-Key : ID 0x424FB55B on subkeys.pgp.net
or http://evilazrael.net/pgp.txt

Christoph’s suggestion should do it, but if it doesn’t, then that
means the linker can’t find your libSDL.a. Those errors are saying
that it can’t find the definitions for things that SDL should be
defining. If changing the library order doesn’t affect it (or if you
get similar errors in the future), then make sure that the necessary
library is installed and the linker knows where to look for it (e.g.
with something like -Lmylibdir/libs).

Jonny DOn Mon, Dec 7, 2009 at 8:11 AM, Christoph Nelles wrote:

Hi,

On Mon, 07 Dec 2009 21:01:32 +0800, Bee wrote:

hi,everyone
when linking the libSDL_console.a,I have the problem as follows,what’s
wrong with it,and anyone can help me?Thanks very much.
*** Building mambo3_demo:
TPTS/Code/mambo3-source-rev160/run/mambo3_demo -mwindows -lmingw32
-L/MinGW/lib -lSDLmain -lSDL -lSDL_console -lSDL_gfx -lSDL_image
-lSDL_mixer

Change the order of linking. Put -lSDL after all other SDL libraries.
During linking the order of dependancies is reversed, the prerequisites
come last and the SDL add-ons depend on SDL.


Christoph Nelles

E-Mail ? ?: evilazrael at evilazrael.de
Jabber ? ?: eazrael at evilazrael.net ? ? ?ICQ ? ? ? : 78819723

PGP-Key ? : ID 0x424FB55B on subkeys.pgp.net
? ? ? ? ? ?or http://evilazrael.net/pgp.txt


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks for Christoph’s suggestion,now it build successfully!
And thanks Jonny D all the same.> ----- Original Message -----

Christoph’s suggestion should do it, but if it doesn’t, then that
means the linker can’t find your libSDL.a. Those errors are saying
that it can’t find the definitions for things that SDL should be
defining. If changing the library order doesn’t affect it (or if you
get similar errors in the future), then make sure that the necessary
library is installed and the linker knows where to look for it (e.g.
with something like -Lmylibdir/libs).

Jonny D

On Mon, Dec 7, 2009 at 8:11 AM, Christoph Nelles <evilazrael at evilazrael.de http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org> wrote:

/ Hi,
/>/
/>/ On Mon, 07 Dec 2009 21:01:32 +0800, Bee <@Bee http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org> wrote:
/>>/ hi,everyone
/>>/ when linking the libSDL_console.a,I have the problem as follows,what’s
/>>/ wrong with it,and anyone can help me?Thanks very much.
/>>/ *** Building mambo3_demo:
/>>/ TPTS/Code/mambo3-source-rev160/run/mambo3_demo -mwindows -lmingw32
/>>/ -L/MinGW/lib -lSDLmain -lSDL -lSDL_console -lSDL_gfx -lSDL_image
/>>/ -lSDL_mixer
/>/
/>/ Change the order of linking. Put -lSDL after all other SDL libraries.
/>/ During linking the order of dependancies is reversed, the prerequisites
/>/ come last and the SDL add-ons depend on SDL.
/>/
/>/
/>/ –
/>/ Christoph Nelles
/>/
/>/ E-Mail : evilazrael at evilazrael.de http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
/>/ Jabber : eazrael at evilazrael.net http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org ICQ : 78819723
/

Best Regards

Bee

Blog:http://www.delnabla.cn http://www.delnabla.cn/