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

Author Topic: Book/Game.hpp: No such file or directory  (Read 4309 times)

0 Members and 1 Guest are viewing this topic.

noahnace10

  • Newbie
  • *
  • Posts: 4
    • View Profile
Book/Game.hpp: No such file or directory
« on: January 23, 2014, 11:14:15 pm »
Hello,
I'm new to both C++ and SFML, and I recently bought the "SFML Game Development" book. After reading the first chapter, I downloaded the source code from the Packt website. After putting the files in my project file, I built the program. However, the log told me:

Fatal error: Book/Game.hpp: No such file or directory

What do I do?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Book/Game.hpp: No such file or directory
« Reply #1 on: January 23, 2014, 11:47:03 pm »
Don't download the source from the Packt website. Download it instead from the GitHub repository, and follow the instructions in the ReadMe.txt file.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

noahnace10

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Book/Game.hpp: No such file or directory
« Reply #2 on: January 24, 2014, 09:56:32 pm »
Don't download the source from the Packt website. Download it instead from the GitHub repository, and follow the instructions in the ReadMe.txt file.

Thank you. I'm no longer having the error.

However, I have a different error. When I compile, the console window says "Failed to load image "Eagle.png". Reason : unable to open file"

Why is this?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Book/Game.hpp: No such file or directory
« Reply #3 on: January 24, 2014, 10:00:21 pm »
If you use the CMake project directly in your IDE to run the game, you have to make sure the working directory is set correctly. But the CMake scripts are not designed for this purpose, I'm not sure if this works at all.

The idea is rather, that you use the project only to install the binaries, and execute them from the explorer or terminal. Installing means compiling the INSTALL project.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything