Hi, I'm trying to study writing GTK+ programs under W32. But I meet a problem immediately. I have put the .h files under my project folder as this path: <project folder>\gtk\*.h, and set the code like this in the source: #include "gtk\gtk.h".
This is the error:
gtk\gtk.h(32): fatal error #1035: Can't find include file <gdk/gdk.h>
The source codes in the head file like this:
#include <gdk/gdk.h>
#include <gtk/gtkaboutdialog.h>
#include <gtk/gtkaccelgroup.h>
#include <gtk/gtkaccellabel.h>
#include <gtk/gtkaccelmap.h>
...
I don't want to change 'path symbol' in all these head files from 'slash' to 'backslash'. So is there a switch in options or properties to let Pelles C accept such unix-style path?
in poide you should insert gtk include paths to Project options... -> Folders -> Include like that your project folder and possible folders like cairo too.
Thanks for your reply! I think it was my fault. I didn't put all head files into my project folder. I'm still fighting with the head files yet...
And moreover PellesC treats slash and backslash in same way (so *nix style is accepted)...
Thanks! I found it too... After testing hundreds times and set a lot of folders / libs / dlls, the hello-world window for gtk+ can show up now ;D
Pelles C and GTK Quick Start Tutorial here (http://forum.pellesc.de/index.php?topic=4713.msg18148#msg18148)
some tests using gtk directory.
include directories used:
..\..\gtk-2.24.10\include;
..\..\gtk-2.24.10\include\gtk-2.0;
..\..\gtk-2.24.10\include\glib-2.0;
..\..\gtk-2.24.10\lib\glib-2.0\include;
..\..\gtk-2.24.10\include\gio-win32-2.0;
..\..\gtk-2.24.10\include\cairo;
..\..\gtk-2.24.10\include\pango-1.0;
..\..\gtk-2.24.10\lib\gtk-2.0\include;
..\..\gtk-2.24.10\include\gdk-pixbuf-2.0;
..\..\gtk-2.24.10\include\atk-1.0
directory tree example
c:\code\gtk-2.24.10\
\bin\
\lib\
\include\
project dir:
c:\code\PellesC\GTKTest\
in project file
POC_PROJECT_WORKPATH = ..\..\gtk-2.24.10\bin#
INCLUDE = $(PellesCDir)\Include\Win;$(PellesCDir)\Include;..\..\gtk-2.24.10\include;..\..\gtk-2.24.10\include\gtk-2.0;..\..\gtk-2.24.10\include\glib-2.0;..\..\gtk-2.24.10\lib\glib-2.0\include;..\..\gtk-2.24.10\include\gio-win32-2.0;..\..\gtk-2.24.10\include\cairo;..\..\gtk-2.24.10\include\pango-1.0;..\..\gtk-2.24.10\lib\gtk-2.0\include;..\..\gtk-2.24.10\include\gdk-pixbuf-2.0;..\..\gtk-2.24.10\include\atk-1.0#
LIB = $(PellesCDir)\Lib\Win;$(PellesCDir)\Lib;..\..\gtk-2.24.10\lib#
Yes. The working environment I setup and tested is very similar with the guideline written by rweidner. If I saw it before, I think I could save some time... 8)