Re: Instructions for compiling with GTK under win32
- From: Vincent Torri <torri math u-strasbg fr>
- To: Richard Nairn <Richard nairnconsulting ca>
- Cc: gtk-list gnome org
- Subject: Re: Instructions for compiling with GTK under win32
- Date: Wed, 25 Feb 2004 20:08:13 +0100 (MET)
> I have tried various combinations for compiling a test program under
> cygwin and MinGW. Can anyone provide me with a recipe for what they did
> for a successful compile of of a program using gtk under either
> environment?
with mingw, i use autotools, but you can begin by using this Makefile
(replace the name of the files, of course...):
# Makefile
OBJECTS = messages.o menu.o utils_gui.o gems.o
all: gems
CFLAGS = -Wall -O2 `pkg-config --cflags gtk+-2.0`
WINFLAGS = -mno-cygwin -mpentium -mms-bitfields -mwindows
# compilation
%.o : %.c
gcc -c $(CFLAGS) $(WINFLAGS) $< -o $@
# linking
gems: $(OBJECTS)
$(CC) $(OBJECTS) -o gems `pkg-config --libs gtk+-2.0`
clean:
@rm -f *o gems
messages.o: messages.h
menu.o: menu.h
utils_gui.o: menu.o utils_gui.h
gems.o: utils_gui.o messages.o
# End of Makefile
regards
Vincent TORRI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]