News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Executable acting strange...

Started by Punnie, October 21, 2005, 04:49:02 PM

Previous topic - Next topic

Punnie

Hi all,

I don't know if this is possible but somehow my executable when running from the Run command in Code::Blocks is behaving differently from the executable that is created from building my file.

Here's what my program is suppose to do: it reads a bitmap extracts its information and prints the RGB values as characters to a text file. This looks exactly like my bitmap when I run the program from the Run command. However when I run the executable that is created, somehow the image gets swapped some how.

I tried rebuilding after deleting the executable, changing my bitmap file etc but nothing seems to work. Where have I gone stupid?!

Please help!!

Urxae

Does your program accept any command-line parameters? If so, maybe you specified some in Project -> Set programs' arguments that make it behave differently.

Another way to check is to set Settings -> Compiler -> Other -> Compiler logging to "Full command line", then run your project. The log will show exactly what command line Code::Blocks runs (including any command-line parameters) and in which directory (relative to your project dir).
See if pasting that command line into a DOS prompt (with as current working directory the same directory as C::B used) produces the same result as running your program from Code::Blocks.

If you still can't figure it out after checking that, try posting your project (sources, .cbp file and sample input) or a link to it. Maybe that extra information would help people here figure out what's going wrong.

rickg22

It could also be that from Code::Blocks, your program is running from ANOTHER directory, and thus it can't find the file you're processing, or creates the text dump somewhere else.

Punnie

Thanks for the hint problem solved now!