Code::Blocks Forums

User forums => Help => Topic started by: JeZ-l-Lee on February 20, 2012, 02:44:12 pm

Title: [10.05-Linux]-GUI Application Does Not Exit?
Post by: JeZ-l-Lee on February 20, 2012, 02:44:12 pm
[10.05-Linux]-"GUI Application" Does Not Exit?

Hi,

Been using Code::Blocks for years and love it!

I recently switched from Windows(R) to Linux.
I installed Code::Blocks for Linux and am starting to use it.

I have a problem with Code::Blocks in Linux.
When I set project to "GUI Application" and run the application
and try to close the application, it does not close and freezes?
(have to go into "System Monitor" and kill it?)

The workaround is to set it to "Console Application".
Anyone know why this is happening?
Thanks!

Running Code::Blocks 10.05 on LinuxMint 12 KDE 64Bit.

Jesse
Title: Re: [10.05-Linux]-GUI Application Does Not Exit?
Post by: oBFusCATed on February 20, 2012, 03:00:16 pm
You have to handle the onclose/onexit event. But please inspect the documentation for the gui toolkit you're using.
Title: Re: [10.05-Linux]-GUI Application Does Not Exit?
Post by: JeZ-l-Lee on February 20, 2012, 03:04:27 pm
You have to handle the onclose/onexit event. But please inspect the documentation for the gui toolkit you're using.
Hi,

I don't understand.

I develop video games using Code::Blocks.
On Windows(R), I can set the game to "GUI Application"
and it does close properly in Code::Blocks.
But on Linux, when I set game to "GUI Application"
it does not close in Code::Blocks and freezes?

This is not a bug in Code::Blocks?

Thanks!

Jesse
Title: Re: [10.05-Linux]-GUI Application Does Not Exit?
Post by: oBFusCATed on February 20, 2012, 03:13:55 pm
What happens if you run your application from a console or from .desktop file?

p.s. on linux there is no distinction between console and gui applications as is done on windows.
Title: Re: [10.05-Linux]-GUI Application Does Not Exit?
Post by: JeZ-l-Lee on February 20, 2012, 03:17:24 pm
What happens if you run your application from a console or from .desktop file?

p.s. on linux there is no distinction between console and gui applications as is done on windows.
Hi,

When I run the executable built with Code::Blocks in console, it does close properly.
Only when I run it in Code::Blocks using "GUI Application" it does not close?

Thanks!

Jesse
Title: Re: [10.05-Linux]-GUI Application Does Not Exit?
Post by: Jenna on February 20, 2012, 04:37:19 pm
Code::Blocks is an IDE, not a compiler.
If your program does not close correctly, it is most likely a problem with your code.

How to exit your program correctly, depends very much on the toolkit you use, as oBFusCATed has posted.

So with this less information, it's not possible to give you meaningful help.