Code::Blocks Forums

User forums => Help => Topic started by: O-san on December 12, 2009, 05:19:11 pm

Title: Can't run binary
Post by: O-san on December 12, 2009, 05:19:11 pm
I am trying to run my executable after I have compiled and linked it successfully. The program immediately exists after creating the main window (using SDL). The "Logs & others" window prints: "Process terminated with status 3". The program runs fine when using the "Start debugging" command (Process terminated with status 0).

I am using Code::Blocks rev 5911 (11 nov 2009) together Windows 7. Is there anyone who can shed some light on this?
Title: Re: Can't run binary
Post by: O-san on December 12, 2009, 07:17:57 pm
Now I've tried to change the gcc compiler (http://www.tdragon.net/recentgcc/) too but I get the same error message. Any help appreciated.
Title: Re: Can't run binary
Post by: oBFusCATed on December 12, 2009, 07:47:07 pm
Have you tried to start it from explorer?
Probably you have problems with the dll of SDL
Title: Re: Can't run binary
Post by: O-san on December 12, 2009, 10:08:58 pm
Thanks for the reply! Yes, it was in explorer I first noticed the problem. I don't think SDL is the problem as my window opens up and then closes again, followed by the error.

I tried to debug the executable by displaying a popup messagebox (standard win32 box) at various places. The problem seemed to appear when I used a push_back function on one of my classes. A strange thing is that the program doesn't go to that particular segment of code when I debug it... (the message box only appears when I execute the binary itself). I'm getting grey hairs over this, thinking of trying the code in MSVC :P

The debugger should tell me if something is wrong with the push_back() shouldn't it?