Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sakib

Pages: [1]
1
General discussions / Re: Need help with ResourceHolder class from book
« on: December 22, 2013, 10:18:27 pm »
interesting... I implemented the resource holder class in a file called ResourceHolder.cpp. Why is that turning out to be a problem?

Also I never used a .inl file before, what is that supposed to be? I am really confused why we use inl file and not .cpp file

2
General discussions / Need help with ResourceHolder class from book
« on: December 22, 2013, 10:01:36 pm »
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

Pages: [1]