I am going through the SFML game development book and I hit a road block with the resource holder class. I am developing on mac using xCode.
I implemented the class based on the book and I am trying to use it but I get this error
Undefined symbols for architecture x86_64:
"ResourceHolder<sf::Texture, Textures::ID>::load(Textures::ID, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_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)
for the following usage
ResourceHolder<sf::Texture, Textures::ID> textures;
try
{
std::string loc = resourcePath()+"Eagle.png";
textures.load(Textures::Airplane, loc);
}
catch (std::runtime_error& e)
{
std::cout << "Exception: " << e.what() << std::endl;
return 1;
}
I dont understand why this is happening.
I attached the source files if that helps
Thanks