To all this, it is also worth mentioning that I am using Linux. Failed to load resource: the server responded with a status of 404 (Not Found) 9 years, 10 months ago. Get early access and see previews of new features. cpp files, here is where i call GetTexture, GetSoundBuffer Connect and share knowledge within a single location that is structured and easy to search. The organization of the project is as follows: Build: Set(SFML_DIR "$ sfml-audio sfml-graphics sfml-window sfml-system) GetFont: sf::Font& Game::GetFont(std::string _fileName)ĬMakeLists.txt: cmake_minimum_required(VERSION 3.18) Sound->loadFromFile(_fileName) sounds = sound SoundBufferPtr sound = std::make_shared() GetSoundBuffer: sf::SoundBuffer& Game::GetSoundBuffer(std::string _fileName) GetTexture: sf::Texture& Game::GetTexture(std::string _fileName) I don't know much about CMake and I don't know if the problem is with my CMakeLists.txt file or with my previously mentioned functions, which I doubt as they worked perfectly before. I've tried over and over again to rearrange the project but every time I compile this happens. So what at first was "Resources / image.png" became "./././Resources/image.png", (which did work for all #include directives) but when I run the game I only see the black screen and console showing me messages like Failed to load image "./././Resources/image.png". Obviously I know that when saving the files in different directories, I had to update the paths. So far there hadn't been any problem with accessing resources, but since I decided to tidy up my project by organizing it in directories, my GetTexture, GetSoundBuffer and GetFont functions are unable to load images from the Resources folder. It will be next to impossible for us to help you.I am programming a little game in C ++ using Visual Studio Code with CMake as the Build System. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. Please do not post an issue without answering the related questions above. Made sure that public, storage, cache and Windows Temp has IUSR full access (also added everyon for the time being but that hasn't worked either)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |