GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Apr 23, 2014 9:15 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Getting Rid of the Command Prompt on Windows
PostPosted: Mon Apr 14, 2008 6:03 am 
Offline

Joined: Mon Apr 14, 2008 5:50 am
Posts: 4
I managed to get GTK+ applications to compile with Visual Studio Express 2005 on Windows, but there is always a command prompt in the background when I run an application. I know that it doesn't have to be that way, as the GIMP and Pidgin run just fine without a command prompt in the background; anyone know how to get rid of it, either in my code or by recompiling GTK+ some other way? I'm just using the pre-compiled GTK+ right now.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 14, 2008 1:51 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
When compiling Win32 GTK+ applications using gcc, the -mwindows option will disable the command prompt thing. I'm assuming there is something similar (or that might even work) for Visual Studio.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 15, 2008 4:13 am 
Offline

Joined: Mon Apr 14, 2008 5:50 am
Posts: 4
I managed to get my program to compile in gcc too (with mingw, not cygwin). Tried it with -mwindows, and it has the same problem. I tried to replace main() with WinMain(), but the program wouldn't link, saying that main() wasn't found. Looking at the source code of Pidgin, I noticed that their Win32 version has a WinMain() and not a main(). Making just a simple Windows API program (just linking to user32.dll and the kernel, nothing else), compiling with gcc without -mwindows works just fine.

I'm more confused than ever on what the solution is, but now hopefully the problem is more well-defined.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group