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 

Getting Rid of the Command Prompt on Windows

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
raouls



Joined: 14 Apr 2008
Posts: 4

PostPosted: Mon Apr 14, 2008 6:03 am    Post subject: Getting Rid of the Command Prompt on Windows Reply with quote

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.
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 505
Location: Portland, OR USA

PostPosted: Mon Apr 14, 2008 1:51 pm    Post subject: Reply with quote

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.
Back to top
raouls



Joined: 14 Apr 2008
Posts: 4

PostPosted: Tue Apr 15, 2008 4:13 am    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming 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