Re: RES: [Dev-C++] GTK + step by step HOW-TO
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <fla...@ya...> - 2003-04-11 18:56:27
|
Thanks you very much for your detailed answer. I will let you know the result. Regards, Flávio. --- "Daniel K. O." <dan...@ya...> escreveu: > > > > In the following web site > > http://www.gimp.org/~tml/gimp/win32/ > > I got many libs and files, I am completely lost! > > I need help and directions on which files I have > to > > download. > > > > You need the dev files for GTK+ 2.2.1; this one > requires glib, atk, pango, > zlib, libpng, libjpeg and libtiff (this is written > on that page), so you > also need to download them (the dev version, if > there's more than one). > Unzip everything on dev-cpp's directory (or under > MinGW's directory, if you > have it installed somewhere else); > > > > > > Then I step by step procedure on how to > integrate it. > > compiler flags, etc. > > > > Download the pkg-config too; if you use a unix-like > shell (like MSYS) you > can use it to compile your gtk programs, like on the > Gtk documentation: > > gcc program.c -o program.exe `pkg-config gtk+-2.0 > --libs --cflags` > > > If you don't want to use a shell to compile your > programs, you'll need to > copy/paste the output for: > > > C (or C++) Compiler Flags: > > pkg-config gtk+-2.0 --cflags > > (it will return something like: > -IC:/DEV-CPP/include/gtk-2.0 > -IC:/DEV-CPP/lib/gtk-2.0/include > -IC:/DEV-CPP/include/atk-1.0 > -IC:/DEV-CPP/include/pango-1.0 > -IC:/DEV-CPP/include/glib-2.0 > -IC:/DEV-CPP/lib/glib-2.0/include > ) > > > > Linker Options: > > pkg-config gtk+-2.0 --libs > > (will be something like: > -LC:/DEV-CPP/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 > ) > > > > So, you can copy/paste it on a GTK+ project on > Dev-Cpp. Oh, one more thing: > add the "-mms-bitfields" to the C/C++ flags. > > > Optionally, you can use this as your GTK+ Template > (I use this one): > > > > - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - 8< - > 8< - 8< - > > > > [Template] > ver=1 > Name=GTK > Icon=Gtk.ico > Description=Create a GUI using Gtk. > Catagory=GUI > > [Unit0] > C=Gtk.txt > Cpp=Gtk.txt > CName=main.c > CppName=main.cpp > > [Project] > UnitCount=1 > Type=0 > IsCpp=0 > Compiler=-mms-bitfields_@@_-I"<INCLUDE>\glib-2.0"_@@_-I"<INCLUDE>\atk-1.0"_@ > @_-I"<INCLUDE>\gtk-2.0"_@@_-I"<INCLUDE>\pango-1.0"_@@_-I"<LIB>\glib-2.0\incl > ude"_@@_-I"<LIB>\gtk-2.0\include" > CppCompiler=-mms-bitfields_@@_-I"<INCLUDE>\glib-2.0"_@@_-I"<INCLUDE>\atk-1.0 > "_@@_-I"<INCLUDE>\gtk-2.0"_@@_-I"<INCLUDE>\pango-1.0"_@@_-I"<LIB>\glib-2.0\i > nclude"_@@_-I"<LIB>\gtk-2.0\include" > Linker=-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 > Name=GTK+ Project > ProjectIcon=Gtk.ico > > > > - >8 - >8 - >8 - >8 - >8 - >8 - >8 - >8 - >8 - >8 - > >8 - >8 - > > > The "Gtk.txt" file contains a small sample, that I > use for almost every GTK+ > program: > > ---- > #include <gtk/gtk.h> > > GtkWidget *win; > > int main(int argc, char *argv[]) > { > gtk_init(&argc, &argv); > > win = gtk_window_new(GTK_WINDOW_TOPLEVEL); > g_signal_connect(G_OBJECT(win), "destroy", > G_CALLBACK(gtk_main_quit), NULL); > gtk_widget_show(win); > > gtk_main(); > } > --- > > > > > > > > > > I tried to browse this list files, but I could > not get > > clear information ( at least to me ) on how to > do > > that. > > > > I answered this question a few times here, but I'll > forgive you, the search > engine on SourceForge is broken... :) > > > > > Daniel K. O. > > > Only ask questions with yes/no answers if you want > "yes" or "no" as the > answer. > http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-no-an > swers.html > > > > > > > ===== Flavio de Souza fla...@ya... Sertãozinho - SP - Brasil Yahoo! ID: flaviostz _______________________________________________________________________ Yahoo! Mail O melhor e-mail gratuito da internet: 6MB de espaço, antivírus, acesso POP3, filtro contra spam. http://br.mail.yahoo.com/ |