I am trying to add the SDL_ttf framework to xCode 4.6. However when I use some of its functions I get the errors:
Undefined symbols for architecture x86_64: "_TTF_CloseFont", referenced from: clean_up() in main.o "_TTF_Init", referenced from: init() in main.o "_TTF_OpenFont", referenced from: load_files() in main.o "_TTF_Quit", referenced from: clean_up() in main.o "_TTF_RenderText_Solid", referenced from: _SDL_main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The things used are a type TTF_font*, TTF_Init(), TTF_OpenFont(), TTF_RenderText_Solid, TTF_CloseFont() and TTF_Quit()
How do I fix this problem?
I have added the SDL Framework and the SDL_image framewor earlier and they all took some fighting to work, mostly it had to do with xcode not finding the headers. Stackoverflow helped with most of it, thank you. But this time I have struggled to long and must ask for help. The problem of "clang: error: linker command failed with exit code 1 (use -v to see invocation)" have come up on stackoverflow earlier, but none of the replies could be applied to this situation. I have also tried following different guides to set up frameworks on xCode. It has not worked and I don't think that is the problem since I have managed to get both SDL and SDL_image to work. But, if it helps I did use this tutorial to add them: http://lazyfoo.net/SDL_tutorials/lesson03/mac/xcode/index.php
I am currentöy following LazyFoos SDL tutorials and got stuck on this part http://lazyfoo.net/SDL_tutorials/lesson07/index.php due to the problem above.
(unrelated smaller question, to get the compiler to compile the main SDL framework I had to add -fno-objc-arc in compile sources under build phases, (How can I disable ARC for a single file in a project?). I have no idea what it did, but it made me able to run the program fine, but can this come back to bite me in the behind later?)