Re: How to build a GTK+ develop environment in Win32 - Pls show me some further examples
- From: Andreas Volz <andreas brachttal net>
- To: "rbyte" <rbyte hotmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to build a GTK+ develop environment in Win32 - Pls show me some further examples
- Date: Tue, 3 Jun 2003 19:06:10 -0200
Am Tue, 3 Jun 2003 17:12:44 +0800 schrieb rbyte:
Andreas,
I have visited http://www.dropline.net/gtk/download.php that you
mentioned.
and downloaded devcpp4.zip and
GTK+-Development-Environment-2.2.1.1.exe. but I am not clear how to
work with these tools. Can you show me some further examples?
Ok,
but I hope all things could help you because I installed gtk2-evironment
before I found this page. And I run on windows at the moment and it's
sometime ago I did compile in windows.
- At first I installed gtk2 + gtk2-devel (you did it with the exe-files)
- Install DevC++
- Add DevC++'s bin-path (were make.exe, gcc.exe,... are) to PATH
- Then use this small examle:
--------------------------
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
--------------------------
And this Makefile:
-------------------------
CC = gcc
GTK2_DEVEL = c:\programme\gtk2-devel
# => path of your gtk2 libs/headers
CFLAGS = -I$(GTK2_DEVEL)/include/glib-2.0
-I$(GTK2_DEVEL)/lib/glib-2.0/include -I$(GTK2_DEVEL)/include/gtk-2.0
-I$(GTK2_DEVEL)/lib/gtk-2.0/include -I$(GTK2_DEVEL)/include/atk-1.0
-I$(GTK2_DEVEL)/include/pango-1.0 -I$(GTK2_DEVEL)/include/glib-2.0
-I$(GTK2_DEVEL)/lib/glib-2.0/include -fnative-struct
# use here all includes you need
LIBS = -L$(GTK2_DEVEL)/lib -lglib-2.0 -Wl,--export-dynamic
-L$(GTK2_DEVEL)/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0
-lgmodule-2.0 -lglib-2.0 #-lintl -liconv
#use here all libs you need
SRC = gtk2_simple.c
BIN = gtk2_simple.exe
all:
$(CC) $(SRC) $(CFLAGS) $(LIBS) -o $(BIN)
clean:
rm -f $(BIN)
------------------------
execute "make" an commandline and hopefully it compiles to
gtk2_simple.exe
But,
- pkg-config don't run without cygwin (I forgot why, search on google)
- I've still some problems with -lintl and -liconv ?? (Perhaps try to
remove '#' from LIBS-Variable, I don't remember...)
have fun, and ask if you've still problems ;-)
bye
Andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]