Compiling GTK + applications on Windows?

I followed this thread to find out gtk, but I can't get it to compile. I downloaded GTK all in one bundleand extracted it in c:\gtk(also set bin as a path variable), but when I try gcc foo.c %VAR%, it says gcc: %VAR%: No such file or directorywhat will I skip 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

+3
source share
2 answers

Remove the spaces around the equal 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
+3
source

Source: https://habr.com/ru/post/1777004/


All Articles