Problem SDL_mixer, I do not know what is bad, please help

Hello

First of all sorry if my English is not very good.
In this summer I created game, and saved its source. I want to improve game now,
but I can not to compile source (source is good, no mistakes). I think, it is
something bad with libraries. I have following errors.

d:\dalius\desktop\starswarslt2\main.o(.text+0x9bf):main.cpp: undefined reference
to Mix_LoadMUS' d:\dalius\desktop\starswarslt2\main.o(.text+0x9eb):main.cpp: undefined reference toMix_LoadWAV_RW’
d:\dalius\desktop\starswarslt2\main.o(.text+0xa17):main.cpp: undefined reference
to Mix_LoadWAV_RW' d:\dalius\desktop\starswarslt2\main.o(.text+0xa43):main.cpp: undefined reference toMix_LoadWAV_RW’
d:\dalius\desktop\starswarslt2\main.o(.text+0xa6f):main.cpp: undefined reference
to Mix_LoadWAV_RW' d:\dalius\desktop\starswarslt2\main.o(.text+0xe4f):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x11d4):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x17f0):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x18f1):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x2a94):main.cpp: undefined reference toMix_OpenAudio’
d:\dalius\desktop\starswarslt2\main.o(.text+0x2d24):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x2e82):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x2fb6):main.cpp: undefined
reference to Mix_PlayingMusic' d:\dalius\desktop\starswarslt2\main.o(.text+0x2fcc):main.cpp: undefined reference toMix_PlayMusic’
C:\DEV-C_~1\Lib\libSDLmain.a(SDL_win32_main.o): In function console_main': /home/hercules/public_cvs/SDL12/src/main/win32/SDL_win32_main.c:244: undefined reference toSDL_SetModuleHandle’

I am using sdl_mixer 1.2.5. In linker I enclose this files : -lmingw32 -lSDL
-lSDLmain -lSDL_image -lSDL_mixer . I tried to compile with Dev C++ 4 and Dev
C++ 5 .

Thanks. If you have any questions fell free.

It seems indeed to be a linker problem. Seems like your linker can’t
find SDL_mixer. Are you sure the path where you put the compiled
SDL_mixer is in your “library path” of either your project or globally
for Dev-C++ (you can do either if I recall correctly)?

Hope it helps,
Gaetan.On Mon, 28 Feb 2005 18:09:10 +0000 (UTC), Dalius wrote:

Hello

First of all sorry if my English is not very good.
In this summer I created game, and saved its source. I want to improve game now,
but I can not to compile source (source is good, no mistakes). I think, it is
something bad with libraries. I have following errors.

d:\dalius\desktop\starswarslt2\main.o(.text+0x9bf):main.cpp: undefined reference
to Mix_LoadMUS' d:\dalius\desktop\starswarslt2\main.o(.text+0x9eb):main.cpp: undefined reference toMix_LoadWAV_RW’
d:\dalius\desktop\starswarslt2\main.o(.text+0xa17):main.cpp: undefined reference
to Mix_LoadWAV_RW' d:\dalius\desktop\starswarslt2\main.o(.text+0xa43):main.cpp: undefined reference toMix_LoadWAV_RW’
d:\dalius\desktop\starswarslt2\main.o(.text+0xa6f):main.cpp: undefined reference
to Mix_LoadWAV_RW' d:\dalius\desktop\starswarslt2\main.o(.text+0xe4f):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x11d4):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x17f0):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x18f1):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x2a94):main.cpp: undefined reference toMix_OpenAudio’
d:\dalius\desktop\starswarslt2\main.o(.text+0x2d24):main.cpp: undefined
reference to Mix_PlayChannelTimed' d:\dalius\desktop\starswarslt2\main.o(.text+0x2e82):main.cpp: undefined reference toMix_PlayChannelTimed’
d:\dalius\desktop\starswarslt2\main.o(.text+0x2fb6):main.cpp: undefined
reference to Mix_PlayingMusic' d:\dalius\desktop\starswarslt2\main.o(.text+0x2fcc):main.cpp: undefined reference toMix_PlayMusic’
C:\DEV-C_~1\Lib\libSDLmain.a(SDL_win32_main.o): In function console_main': /home/hercules/public_cvs/SDL12/src/main/win32/SDL_win32_main.c:244: undefined reference toSDL_SetModuleHandle’

I am using sdl_mixer 1.2.5. In linker I enclose this files : -lmingw32 -lSDL
-lSDLmain -lSDL_image -lSDL_mixer . I tried to compile with Dev C++ 4 and Dev
C++ 5 .

Thanks. If you have any questions fell free.


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

is the .dll in your project directory (never used SDL_mixer , but most
SDL_thingy’s have a dll).

i got the same problem the first time i used dev-cpp because various
sources said to put the dll in c:\windows or c:\windows\system so they
would be available system-wide, but i needed to put SDL.dll in the
source directory