![]() |
|
Problems with Code:Blocks |
Scooter
Member #16,799
January 2018
|
Hi Guys: 1- I have a program I am trying to run from my Desktop. It requires loading 2- The other day I took another disc and installed Ubuntu 18.04.1. I installed Thanks and I hope all is well. Merry Christmas to everyone!!!! |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Those jpeg files have to be in the same directory as your program. Your program is not an exe on linux. It doesn't have any extension. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You have to set the working executable directory, for the shortcut. The start in directory. EDIT Every program has a current working directory. When it is started from a different directory, things aren't where they are expected to be in terms of relative paths. What you need to do is set the working directory of the program at run time. ALLEGRO_PATH* p = al_get_standard_path(ALLEGRO_RESOURCES_PATH); al_change_directory(al_path_cstr(p)); al_destroy_path(p);
Edit My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
princeofspace
Member #11,874
April 2010
![]() |
It sounds to me like you'd like to embed the resource files into the executable, which is something most of us don't do -- typically, I send a game to somebody with a resource archive, so two files instead of one. I switched to Code::Blocks recently, and discovered that if you put the resource files in the same directory as the source files (one level up from bin, where the Debug/Release code is compiled to) the executable finds the resources just fine. In other words, what Edgar was saying about the current working directory was correct: Code::Blocks set the CWD to the project root. If you've found the Code::Blocks project file, with the extension cbp, you've found the right directory! |
Scooter
Member #16,799
January 2018
|
Thanks prince for your reply. I have never created a project I finally got a project created. Loaded my program to compile and |
|