SFML community forums

Help => General => Topic started by: noahnace10 on January 23, 2014, 11:14:15 pm

Title: Book/Game.hpp: No such file or directory
Post by: noahnace10 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?
Title: Re: Book/Game.hpp: No such file or directory
Post by: Nexus on January 23, 2014, 11:47:03 pm
Don't download the source from the Packt website. Download it instead from the GitHub repository (https://github.com/SFML/SFML-Game-Development-Book), and follow the instructions in the ReadMe.txt file.
Title: Re: Book/Game.hpp: No such file or directory
Post by: noahnace10 on January 24, 2014, 09:56:32 pm
Don't download the source from the Packt website. Download it instead from the GitHub repository (https://github.com/SFML/SFML-Game-Development-Book), 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?
Title: Re: Book/Game.hpp: No such file or directory
Post by: Nexus 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.