Re: how to prevent the console window poping out when running gtkmm app in windows vista?



On Wed, 2009-05-06 at 01:36 -0400, Paul Richards wrote:
> If you compile a non-console app, you'll also need to define WinMain like I do below:
> 
> #if defined(WIN32) || defined (_WIN32) || defined(WIN64) || defined(_WIN64)
> namespace windowsh {
> #include <windows.h>
> int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdline, int)
> {
>  // you might want to parse lpCmdline into seperate args, I'll leave that up to you
>  char* argv[2] = { lpCmdline, NULL };
>  return main(0, argv); // Assuming here no argruments are passed...
> }
> }
> #endif

What's the advantage of doing this? main() seems to work equally well as
entry point for the few programs I build on Windows.

Armin

> ---------[ Received Mail Content ]----------
> Subject : Re: how to prevent the console window poping out when running gtkmm app in windows vista?
> Date : Fri, 01 May 2009 10:00:31 -0500
> >From : Jonathon Jongsma <jonathon quotidian org>
> To : 明覺 <shi minjue gmail com>
> Cc : gtkmm-list gnome org
> 
> 明覺 wrote: 
> > I installed gtkmm and minWG in windows vista, and compiled a sample 
> > gtkmm app successfully, it also runs successfully, but the problem is 
> > it also pops out a console window with it, how to disable the console 
> > window? thanks. 
> > 
> 
> I don't program on windows, but if I remember correctly, you have to compile (or link?) 
> with the -mwindows option or something like that. 
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]