User forums > Help
Can't load .bmp file when running in C::B (works fine outside of C::B)
(1/1)
Kzone272:
I've been using OpenGL for only a couple of days, and I'm just starting to experiment with textures. The problem I'm having (as mentioned above) is that when I try running the program inside of C::B (Build>>Run), it fails to load the image (even though the output .exe is in the same directory as the .bmp image). However when I run the .exe in Windows Explorer the image loads in without any problems. So it seems like C::B is running the .exe from another directory other than where the output .exe is. I've tried adding the .bmp file to the project, but that didn't change anything. Is there anyway I can either get C::B to run the .exe in the output directory (if that's the problem), or add the .bmp to the project somehow to make it load properly? Here's a copy of my build log if it helps:
--- Code: ---Checking for existence: C:\Users\Kevin\Documents\C++\OpenGL\Textures\Textures.exe
Executing: "C:\Program Files\CodeBlocks/cb_console_runner.exe" "C:\Users\Kevin\Documents\C++\OpenGL\Textures\Textures.exe" (in C:\Program Files\CodeBlocks\MinGW\bin)
--- End code ---
MortenMacFly:
--- Quote from: Kzone272 on August 01, 2011, 01:30:04 am ---Executing: "C:\Program Files\CodeBlocks/cb_console_runner.exe" "C:\Users\Kevin\Documents\C++\OpenGL\Textures\Textures.exe" (in C:\Program Files\CodeBlocks\MinGW\bin)
--- End quote ---
As usual, you should carefully inspect the log of Code::Blocks. You are running your app in the MinGW/bin directory where surely the textures are not.
Please setup the application path to run from in the project options for the appropriate target.
Kzone272:
Yeah I thought that was it, but I can't find that setting in the menu. Any idea where I can find it? I'm still looking.
Nevermind I just found it. Thanks for the help!
Jenna:
"Project -> Properties -> Build targets"
Navigation
[0] Message Index
Go to full version