GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Prevent Windows Console ( cmd.exe ) From Popping Up

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
maredsous10



Joined: 12 Feb 2010
Posts: 2

PostPosted: Fri Feb 12, 2010 8:53 pm    Post subject: Prevent Windows Console ( cmd.exe ) From Popping Up Reply with quote

When I launch my executable using GTK+ on Windows, a console window (cmd.exe) pops up. How do I prevent this?

I tried another suggestion on these forums, which discussed creating a dummy_handler for console messages. I didn't have any luck when I did that.
Back to top
tadeboro
Never Seen the Sunlight


Joined: 23 Jul 2008
Posts: 2114
Location: Slovenia

PostPosted: Sat Feb 13, 2010 1:05 pm    Post subject: Reply with quote

Hello and welcome to the GTK+ forums.

On Windows, you need to inform compiler/linker (not sure which one exactly) that your application is not console application but GUI application. When using MinGW to compile your application, all you need to do is add -m windows flag to command line. I don't know about VisualC.

Tadej
Back to top
maredsous10



Joined: 12 Feb 2010
Posts: 2

PostPosted: Mon Feb 15, 2010 3:57 pm    Post subject: Reply with quote

Thanks. That worked for me.

I'm using a MinGW setup similar to your description on thread 1753.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP