[SDL] undefined reference to `operator new(unsigned)' ???
g_sdl at zewt.org
Mon Jan 13 00:24:01 PST 2003
On Mon, Jan 13, 2003 at 08:00:06AM -0000, Sweeney, Steven (FNB) wrote:
> I've just had a user write to me saying that they cannot compile my app with
> SDL 1.2.4-5 (which they installed via an RPM) for Redhat 8.0
> Just trying to eliminate possibilities here... could it be they should
> install an earlier version of SDL?
> Has anyone else had this problem?
> gcc `/usr/bin/sdl-config --cflags --libs` -lSDL_mixer -lSDL_image ai.o
> aliens.o audio.o bullets.o cargo.o collectable.o comms.o events.o
> explosions.o game.o globals.o graphics.o init.o intermission.o loadSave.o
> messages.o misc.o missions.o player.o resources.o script.o shop.o
> Starfighter.o title.o unpack.o weapons.o -o starfighter
> aliens.o: In function `addAlien()':
> aliens.o(.text+0x258): undefined reference to `operator new(unsigned)'
operator new is a C++ thing; it should be using "g++", not "gcc".
More information about the SDL