1
General / Thor not able to load resources on Mac OS X 10.10
« on: December 22, 2014, 07:00:28 pm »
Hey guys, I'm trying to load some resources using the Resource module from the Thor library, and it doesn't seem to work. I compiled and looked at the examples in Thor, and they seem to be doing the same thing (failing to load any resource), which tells me the problem is probably in the way I built Thor. I played around with the build setting in cmake but was unable to get it to work, everything else seems to work fine. Using the debugger I found that the ResourceKey for any resource never actually gets put in the map in ResourceCache. I can't figure out why this is happening!
This is what I'm using to test
the output (this is similar to each example in Thor that loads resources)
platform: Mac OS X 10.10, Xcode 6.1
compiler: Apple LLVM 6.0, using libc++ and c++11 language dialect
This is what I'm using to test
thor::ResourceKey<sf::Font> fontKey = thor::Resources::fromFile<sf::Font>("Font/sansation.ttf");
try
{
mFont = resourceCache.acquire(fontKey);
}
catch (thor::ResourceLoadingException &e)
{
std::cout << e.what() << std::endl;
}
(FYI: The file is most definitely present.)try
{
mFont = resourceCache.acquire(fontKey);
}
catch (thor::ResourceLoadingException &e)
{
std::cout << e.what() << std::endl;
}
the output (this is similar to each example in Thor that loads resources)
Failed to load font "Font/sansation.ttf" (failed to create the font face)
Failed to load resource "[FromFile] Font/sansation.ttf"
Failed to load resource "[FromFile] Font/sansation.ttf"
platform: Mac OS X 10.10, Xcode 6.1
compiler: Apple LLVM 6.0, using libc++ and c++11 language dialect