Author Topic: Can't run binary  (Read 4122 times)

Offline O-san

  • Multiple posting newcomer
  • *
  • Posts: 25
    • OddGames
Can't run binary
« 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?

Offline O-san

  • Multiple posting newcomer
  • *
  • Posts: 25
    • OddGames
Re: Can't run binary
« Reply #1 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Can't run binary
« Reply #2 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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline O-san

  • Multiple posting newcomer
  • *
  • Posts: 25
    • OddGames
Re: Can't run binary
« Reply #3 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?