justblink
justblink

Reputation: 31

Compiling GTK+ applications on windows?

I was following this thread in order to learn gtk but I cant seem to get it to compile. I've downloaded the GTK all in one bundle and extracted it to c:\gtk (have also set bin as a path variable), but when I try gcc foo.c %VAR% it says gcc: %VAR%: No such file or directory, what am I missig here?.

this is my VAR.bat file

set VAR = -mms-bitfields -IC:/gtk/include/gtk-2.0 -IC:/gtk/lib/gtk-2.0/include -IC:/gtk/in
clude/atk-1.0 -IC:/gtk/include/cairo -IC:/gtk/include/pango-1.0 -IC:/gtk/include
/glib-2.0 -IC:/gtk/lib/glib-2.0/include -IC:/gtk/include -IC:/gtk/include/freety
pe2 -IC:/gtk/include/libpng14  -LC:/gtk/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -lat
k-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpan
go-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl

start cmd

and I have this in the same directory as foo.c

Upvotes: 3

Views: 1706

Answers (2)

G-71
G-71

Reputation: 3682

You can use Dev-C++ to compile GTK+ applications. Please follow this introduce http://users.libero.it/efa/gtkDev-C++En.html

Upvotes: 0

unwind
unwind

Reputation: 399833

Remove the spaces around the equals sign in the bat file:

C:\Users\unwind>set a = hello

C:\Users\unwind>echo %a%
%a%

C:\Users\unwind>set a=hello

C:\Users\unwind>echo %a%
hello

Upvotes: 3

Related Questions