Problem with SDL_Image in OS X

Hi!

I’ve just started trying to develop something in OS X and I am having some issues in the installation of SDL. Well, first of all I’ve installed SDL and at the beginning I wasn’t able to compile anything with “g++ -o main main.cpp -lSDL” until I discovered "++ -o test main.cpp sdl-config --cflags --libs".

My problem showed when I’ve installed SDL_Image throwing me this error: Undefined symbols for architecture x86_64:
"_IMG_Load", referenced from:
load_image(std::basic_string<char, std::char_traits, std::allocator >)in ccAW4U7a.o
"_TTF_CloseFont", referenced from:
clean_up() in ccAW4U7a.o
"_TTF_Init", referenced from:
init() in ccAW4U7a.o
"_TTF_OpenFont", referenced from:
load_files() in ccAW4U7a.o
"_TTF_Quit", referenced from:
clean_up() in ccAW4U7a.o
"_TTF_RenderText_Solid", referenced from:
_SDL_main in ccAW4U7a.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

I would appreciate any help.

Thanks for everything!

You need to add -lSDL_image and -lSDL_ttfOn Wed, Jul 17, 2013 at 5:18 PM, AritzBi wrote:

**
Hi!

I’ve just started trying to develop something in OS X and I am having some
issues in the installation of SDL. Well, first of all I’ve installed SDL
and at the beginning I wasn’t able to compile anything with “g++ -o main
main.cpp -lSDL” until I discovered "++ -o test main.cpp sdl-config --cflags --libs".

My problem showed when I’ve installed SDL_Image throwing me this error:
Undefined symbols for architecture x86_64:
"_IMG_Load", referenced from:
load_image(std::basic_string**, std::allocator** >)in ccAW4U7a.o
"_TTF_CloseFont", referenced from:
clean_up() in ccAW4U7a.o
"_TTF_Init", referenced from:
init() in ccAW4U7a.o
"_TTF_OpenFont", referenced from:
load_files() in ccAW4U7a.o
"_TTF_Quit", referenced from:
clean_up() in ccAW4U7a.o
"_TTF_RenderText_Solid", referenced from:
_SDL_main in ccAW4U7a.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

I would appreciate any help.

Thanks for everything!


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