The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Problem with SDL_Image in OS X
AritzBi


Joined: 16 Jul 2013
Posts: 1
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<char>, std::allocator<char> >)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!
Problem with SDL_Image in OS X
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
You need to add -lSDL_image and -lSDL_ttf


On Wed, Jul 17, 2013 at 5:18 PM, AritzBi wrote:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org