Error linking objectfiles created by g++/c++

Hi !

I have a problem linking object-files created by g++ or c++ that use the mixer :

c++ -o test test.o -Lmixer -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lmixer
-lpthread -lSDL -lttf -ldl -lg++

test.o: In function main': test.o(.text+0x6b): undefined reference toMix_OpenAudio(unsigned int, unsigned short, int, int)'
test.o(.text+0xb0): undefined reference to Mix_QuerySpec(unsigned int *, unsigned short *, int *)' test.o(.text+0x11b): undefined reference toMix_LoadWAV_RW(SDL_RWops *, int)'
test.o(.text+0x132): undefined reference to Mix_PlayChannel(int, Mix_Chunk *, int)' test.o(.text+0x14d): undefined reference toMix_Playing(int)‘
test.o(.text+0x163): undefined reference to `Mix_CloseAudio(void)’

when I use gcc to create the object-files everything’s fine.

This is how I compile the object-file:

gcc -ansi -Wall -pedantic -O5 -funroll-loops -fomit-frame-pointer -ffast-math
-fexpensive-optimizations -m486 -s -o test.o -c test.c
-Imixer -I/usr/include/SDL -I/usr/local/include/SDL -I/usr/local/include

replacing gcc by g++ or c++ does not result in an error message right here, but
linking (with gcc, g++ and c++) fails.

I’d like to program in C++, so I have to work with g++ or c++.
I think I’m doing something wrong when creating the object-files - does anybody know
what I’m doing wrong ?

Olaf

PS: I tried to install ‘libu’ - same problem…

^^^^^^

you want -lSDL_mixerOn Sun, 06 Aug 2000, you wrote:

Hi !

I have a problem linking object-files created by g++ or c++ that use
the mixer :

c++ -o test test.o -Lmixer -L/usr/local/lib -Wl,-rpath,/usr/local/lib
-lmixer -lpthread -lSDL -lttf -ldl -lg++