RE: Suppressing command window



May be I was not clear in explaining my problem. I have used the
-mwindows, which essentially suppresses all the debugging info(may be my
printfs). But my requirement is different

 I've packaged the application along with the required GTK dlls in a zip
file.

 Created a batch file, which, appends the current gtk\bin path to local
path and then launch the application.

And the console window, which was opened by the batch file will be
visible till closed explicitly. 

My requirement here is either I shall be in a position to set the path
through program, hence avoid the .bat requirement or automatically close
the console was the application is launched.

I tried using getenv() and putenv(), but it is not working as expected.

What's the best way to distribute GTK+ application without batch file.

Thanks and Regards
Laxmi



-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Tor Lillqvist
Sent: Friday, November 24, 2006 5:57 PM
To: gtk-app-devel-list gnome org
Subject: Re: Suppressing command window

Sai Korada writes:
I'm developing an application with GTK+ and created a batch file to
set
the path, launch the application with command line arguments.

... presumably on Windows?

Even after launching the application the command window still
appears, which is by default. My requirement is, once the
application is launched, is there a way to suppress the command
window.

The correct term is console window.

Link the executable with the flag -mwindows (if using the GNU linker)
or /subsystem:windows (if using the Microsoft linker).

If you use the Microsoft linker this also means, I think, your app
should have a WinMain() instead of main().

(This is nothing GTK+-specific, but basic Windows programming stuff.)

--tml

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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