0
\$\begingroup\$

I am learning Raylib game library, but in the "First Person Maze" example the images cannot be found, for example: 

`Image imMap = LoadImage("cubicmap.png");`

returns a File not Found by the compiler/linker, it´s the same with the other image. I am using CodeLite IDE, but I don't know how to add assets, right now I have them in a virtual folder named "resources".

Any help would be nice, I have googled the problem but I can't find anything. But now I don't know what's wrong because I have compiled the library with make and make install and also added Raylib package from Arch Linux and I can't even run the My first window example from the site.

\$\endgroup\$
5
  • \$\begingroup\$ The example has the folder name 'resources' prepended to the file name. You might want to try the same. \$\endgroup\$ – Vaillancourt Mar 29 at 0:13
  • \$\begingroup\$ I have tried that but in the console, when i run the program it says fail to open file, same thing for the other texture and i can only see a new window with the FPS count running, (and then it stops) \$\endgroup\$ – Jorge Carretero Mar 29 at 0:21
  • 1
    \$\begingroup\$ Did you make sure that the path of your assets is relative to where the executable will be built and ran? \$\endgroup\$ – Vaillancourt Mar 29 at 0:24
  • \$\begingroup\$ Vaillancourt you were right the folders in CodeLite are really virtual, you have to make shure the file is actually there \$\endgroup\$ – Jorge Carretero Mar 29 at 0:46
  • \$\begingroup\$ You might want to write an answer with all of this to help future visitors :) \$\endgroup\$ – Vaillancourt Mar 29 at 0:50
1
\$\begingroup\$

As Vaillancourt said, in CodeLite IDE when you create a virtual folder it's really virtual, you have to make sure your files are actually in a folder in your project, otherwise your files won't be loaded.

\$\endgroup\$
1
  • \$\begingroup\$ Often, the "folders" you see in your IDE are there just to organize the code in the project, they are not necessarily related to how the files are laid out in the file system (in Visual Studio, those "folders" are even called "filters" to avoid confusion, even if the icon is the classic "folder" icon). Also, your assets don't generally belong to the IDE's "folder" structure. The compiler and linkers are unaware of those assets, they're only important when the game is executed. \$\endgroup\$ – Vaillancourt Mar 29 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.