Re: GTK+2 & Windows



I'm sorry, I know that question was answered before, but I can't find this.

How can I prevent the console window when I launch a gtk program under Windows?

I know that I need set a flag to then compiler.

Thanks in advance.
Eduardo Lopez



Clive Levinson escribió:

Hi Alf,
I have had no trouble building GTK+ apps using cygwin under Windows.
A partial extract from my make file may help you solve your problem.

GTK_CFLAGS=-c -Wall -mno-cygwin -mms-bitfields -O2 `pkg-config --cflags gtk+-2.0`
GTK_LIBS=`pkg-config --libs gtk+-2.0`
GTK_LFLAGS=-Wall -mno-cygwin -mms-bitfields -s -mwindows

gcc $(GTK_CFLAGS)  app.cpp -o app.o
windres -i resource.rc -o resource.o
g++   $(GTK_LFLAGS) -o app.exe app.o resource.o  $(GTK_LIBS)

Note that I am using the -mno-cygwin which instructs gcc not to link with the cygwin libraries (effectively makes cygwin gcc act like MinGW). This flag is only probably required for linking, not for compiling, but it doesn't seem to do any harm.
Totsiens,
Clive


------------------------------------------------------------------------


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.643 / Virus Database: 411 - Release Date: 25/03/2004
------------------------------------------------------------------------

_______________________________________________
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]