I’m trying to do the same thing and getting the same error. All other SDL-components work just fine (SDL_mixer, SDL_Image and SDL).
Code:
“_TTF_Init”, referenced from:
cwing::System::System()in System.o
cwing::System::System()in System.o
"_TTF_Quit", referenced from:
cwing::System::~System()in System.o
cwing::System::~System()in System.o
"_TTF_CloseFont", referenced from:
cwing::System::~System()in System.o
cwing::System::~System()in System.o
cwing::System::~System()in System.o
cwing::System::~System()in System.o
"_TTF_OpenFont", referenced from:
cwing::System::System()in System.o
cwing::System::System()in System.o
cwing::System::System()in System.o
cwing::System::System()in System.o
"_TTF_RenderText_Blended", referenced from:
cwing::setText(std::basic_string<char, std::char_traits, std::allocator >)in Label.o
cwing::Label(int, int, std::basic_string<char, std::char_traits, std::allocator >)in Label.o
cwing::Label(int, int, std::basic_string<char, std::char_traits, std::allocator >)in Label.o
cwing::Button::Button(int, int, std::basic_string<char, std::char_traits, std::allocator >)in Button.o
cwing::Button::Button(int, int, std::basic_string<char, std::char_traits, std::allocator >)in Button.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Anyone got any ideas of what could be wrong? This is driving me nuts!
I have tried using different kind of include-formats such as:
Code:
//First format
#include “SDL_ttf.h”
//Second format
#include <SDL_ttf/SDL_ttf.h>
And neither of them work. Iv’e also tried to delete all my SDL-frameworks and reinstalling them without any luck.
Oh, and i’ve also tried to add a linker flag to the project:
Project > Project Settings > Build > Linking > Other Linking Flags > “lSDL_ttf”. This gives the following output:
Code:
Command /Developer/usr/bin/g+±4.2 failed with exit code 1
Any help would be much appreciated!