Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: whyisosad on December 19, 2008, 10:40:45 am

Title: Sample wxWidgets application under windows: terminated with status -1
Post by: whyisosad on December 19, 2008, 10:40:45 am
I created a wxWidgets project with default settings. Everything is ok when I compiled and started the program, but after closing the appliication window, I got message from CodeBlocks:
Quote
Process terminated with status -1 (0 minutes, 1 seconds)
What's problem with it? I'm using wxWidgets-2.8.9, MinGW-5.1.4 and the newest nightly build on XP(with SP2) system.
PS:On my Debian system, it doesn't has this problem.
Title: Re: Sample wxWidgets application under windows: terminated with status -1
Post by: ollydbg on December 20, 2008, 08:04:57 am
It's normal in windows. There's no problem. :D
Title: Re: Sample wxWidgets application under windows: terminated with status -1
Post by: Jenna on December 20, 2008, 09:26:08 am
It's normal in windows. There's no problem. :D

That's not right !!!

You created a dialog-based program I guessed, there the OnInit-function returns false if it ends, that leads to a program return-value of -1 on windows and 255 on linux  (at least on 64-bit linux).
In the frame-based sample it returns true, what leads to a program return-value of 0.
Title: Re: Sample wxWidgets application under windows: terminated with status -1
Post by: ollydbg on December 21, 2008, 02:24:51 pm
Thanks for your reply.
Yes, I just meant that "It's normal that the main() function should return a value".