I am trying to compile the following file
under Linux with SDL: File name is t-sdl.cc
#include <stdlib.h> #include "SDL/SDL.h" int main() { if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) { fprintf(stderr, "Unable to init SDL: %s\n",
SDL_GetError());
exit(1); } atexit(SDL_Quit); }
Here is the contents of my Makefile:
CXXFLAGS=-W -Wall -Wpointer-arith -ffast-math
-fomit-frame-pointer -O1 -fno-implicit-templates
SHELL=/bin/bash %.run: % ./$*.exe t-sdl: t-sdl.cc gcc `sdl-config --cflags` `sdl-config --libs` -lSDL_image
t-sdl.cc -o t-sdl
Here is the linker error that results from calling
make t-sdl.run:
cd ~/sdl/mysdl/ make t-sdl.run gcc `sdl-config --cflags` `sdl-config --libs` -lSDL_image
t-sdl.cc -o t-sdl
/tmp/ccGXlDLe.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0’
collect2: ld returned 1 exit status make: *** [t-sdl] Error 1
Please help me with the linker error.
What linker options should I specify to eliminate
the __gxx_personality_v0 error?
Thank you for your help…
Davin Pearson----------------------------------------------
Mailblocks - A Better Way to Do Email
http://about.mailblocks.com/info