From: ironhead <iro...@ro...> - 2003-06-11 01:14:34
|
I've compiled the Hello World demo from gtk.org, and it works fine, except it pops up a command window when it executes, and I'm not sure why. I tried -mwindows, so the box doesn't open when executing, but there is still a command box that flashes when the app is closed. Is there something else I need to add? Here is my Makefile: CC=gcc CFLAGS=-W -Wall -pedantic -mno-cygwin -mms-bitfields -c INCS=-I"C:/GTK/include/gtk-2.0" -I"C:/GTK/lib/gtk-2.0/include" -I"C:/GTK/include/glib-2.0" -I"C:/GTK/lib/glib-2.0/include" -I"C:/GTK/include/pango-1.0" -I"C:/GTK/include/atk-1.0" -I"C:/GTK/include" LDFLAGS=-mno-cygwin LIBS=-L"C:/GTK/Lib" -lgtk-win32-2.0 -lgdk-win32-2.0 -lgthread-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv OBJS=gtk-test.o SRCS=gtk-test.c release: $(CC) -O2 $(INCS) $(CFLAGS) $(SRCS) $(CC) -s $(LDFLAGS) -o gtk-test $(OBJS) $(LIBS) debug: $(CC) -ggdb $(INCS) $(CFLAGS) $(SRCS) $(CC) -s $(LDFLAGS) -o gtk-test $(OBJS) $(LIBS) clean: del $(OBJS) Thanx in advance! Chris --- iro...@ro... http://ishell.sourceforge.net http://shellwm.sourceforge.net http://bb4win.org |
From: Greg C. <chi...@mi...> - 2003-06-11 02:32:21
|
ironhead wrote: > > I've compiled the Hello World demo from gtk.org, and it works fine, > except it pops up a command window when it executes, and I'm not sure > why. I tried -mwindows, so the box doesn't open when executing, but > there is still a command box that flashes when the app is closed. Might it be spawning a console app? |
From: Tor L. <tm...@ik...> - 2003-06-11 17:31:51
|
ironhead writes: > I tried -mwindows, so the box doesn't open when executing, but > there is still a command box that flashes when the app is closed. Start the program with stdout and stderr redirected to a file, if you want to see what output there might be in the console windows. It might be that it is trying to tell you something important ;-) > Is there something else I need to add? Here is my Makefile: Seems fine to me. (Except that the -mno-cygwin flag is unnecessary if you are using the mingw compiler.) --tml |
From: Michael B. <mic...@gm...> - 2003-06-11 20:11:40
|
Tor Lillqvist wrote: >ironhead writes: > > I tried -mwindows, so the box doesn't open when executing, but > > there is still a command box that flashes when the app is closed. > >Start the program with stdout and stderr redirected to a file, if you >want to see what output there might be in the console windows. It >might be that it is trying to tell you something important ;-) > > > Is there something else I need to add? Here is my Makefile: > >Seems fine to me. (Except that the -mno-cygwin flag is unnecessary if >you are using the mingw compiler.) > >--tml > > > > I would use pkg-config for INCS an LIBS, but it is just my 3p's. NB.. I do not get a popoup console windows for gtk - programs. There used to be a general problem with msys' rxvt popping up black windows, but it shoul be over by now. Did you try to start your test program from the cmd window? |
From: ironhead <iro...@ro...> - 2003-06-12 00:14:48
|
Hey All, > >Start the program with stdout and stderr redirected to a file, if you > >want to see what output there might be in the console windows. It > >might be that it is trying to tell you something important ;-) I would if I could.... ;) I followed the directions on GAIM web site, and I've added my program (gtk-test.exe) to HKLM\Software\Microsoft\Windows\CurrentVersion\AppPaths setting Path to the path of the GTK libs (in Program Files\Common Files\GTK\2.0\Libs). This works for launching the app via the Run dialog or explorer, however, if I try to execute it from the cmd prompt, it complains about being unable to find the gtk libs. > I would use pkg-config for INCS an LIBS, but it is just my 3p's. > NB.. I do not get a popoup console windows for gtk - programs. > There used to be a general problem with msys' rxvt popping up black > windows, > but it shoul be over by now. Did you try to start your test program > from the cmd window? Same problem as above.... When I try to execute pkg-config, it too complains about being unable to find the gtk/glib libs. I guess I could add it to the MSYS path variable, unless there is a better way to handle it? Thanx! Chris |
From: Michael B. <mic...@gm...> - 2003-06-12 17:45:38
|
ironhead wrote: >Hey All, > > <snipp> Hi, 1. redirection works from the bash shell, e.g. rxvt msys window. 2. pkg-config looks for gtk+-2.0.pc usually in {prefix}/lib/pkgconfig. It is a text file which gives the libs and cflags for the gtk package. You can allways execute it with the full path to the pc file e.g: pkg-config --libs /mingw/lib/pkgconfig/gtk+-2.0.pc if your file is in /mingw/lib/pkgconfig. hth michael. |