RES: RES: [Dev-C++] Does anyone know how to use GtkGlext in Dev-C++?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel K. O. <dan...@ya...> - 2003-02-27 16:37:03
|
Well, I use a template file like this (`Templates\Gtk.template'):
=========================
[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"
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
=========================
The linker options I just copy/pasted from the `pkg-config --libs gtk+-2.0'.
Also a GTK icon (Gtk.ico) and a sample code (Gtk.txt):
=========================
#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();
}
=========================
Daniel K. O.
> -----Mensagem original-----
> De: Jack Chen [mailto:jac...@ya...]
> Enviada em: quinta-feira, 27 de fevereiro de 2003 13:12
> Para: Daniel K. O.
> Assunto: Re: RES: [Dev-C++] Does anyone know how to use GtkGlext in
> Dev-C++?
>
>
> --- "Daniel K. O." <dan...@ya...> wrote: >
> >
> > > I noticed that when building a GTK application, the first line
> > in
> > > the source file is
> > >
> > > #include "GTK/gtk.h"
> > >
> > > . However, the real path is
> > C:\....\Dev-C++5\include\gtk-2.0\gtk\gtk.h.
> > > Apparently, the default GTK include folder is
> > C:\....\Dev-C++5\include
> > > gtk-2.0\. So, I'd like to know how Dev 5 does that, or how I can
> > > manually do it, along with other default paths for lib and other
> > stuff
> > > that are in the package.
> > >
> >
> >
> > Use the MinGW/GCC option, "-I", so you can include other directories,
> > like
> >
> > -I"<INCLUDE>\gtk+-2.0"
> > -I"<INCLUDE>\GtkGLext\"
> >
> > This is useful to put in a dev's template. If it's just one project,
> > you can
> > simply use the Project Options dialog to add other directories.
> >
> >
> >
> > Daniel K. O.
> >
> >
> >
> >
>
>
> Thanks, but how do I then tell that \gtk+-2.0 is the default directory
> for gtk projects? Or will Dev-C++ check by itself to see which
> directory has the needed .h file, and then set that directory as the
> default one? Is it as simple as you made me think...that Dev-C++ will
> search the stuff all by itself? :D
>
> Thanks for your help.
>
> Jack
_______________________________________________________________________
Busca Yahoo!
O serviço de busca mais completo da Internet. O que você pensar o Yahoo! encontra.
http://br.busca.yahoo.com/
|