I want to compile a code in GTK+3. Without using MSYS2 nor Visual Studio. I'm getting "undefined reference to"
First, tried with this tutorial from the official page: https://www.gtk.org/download/windows.php but it was a mess using MSYS2; plus, i dont want a linux like nor a unix like environment (a lot less Visual Studio).
I downloaded the "all in one bundle" for version 2, setted up the enviroment variable an all that stuff. Everything worked fine, the code compiled! (a code from version 2). Then i tried to change to version 3, downloaded the all in one bundle (64 bits) from: http://www.tarnyko.net/dl/gtk.htm
Of course, the enviroment variable was updated, and the verions of the libraries in the compiling line too. And the program is for version 3, specifically the first in the official site: https://developer.gnome.org/gtk3/stable/gtk-getting-started.html. Didn't worked.
Then, followed this tutorial: http://www.tarnyko.net/repo/gtk3_build_system/tutorial/gtk3_tutorial.htm
I rewroted the compiling line with the result of the command: pkg-config --cflags --libs gtk+-3.0
(as the tutorial above says)
the compilation line for the version 2 (works right) is:
gcc -Wall -g test.c -o test -mms-bitfields -Ic:/gtk/include/gtk-2.0 -Ic:/gtk/lib/gtk-2.0/include -Ic:/gtk/include/atk-1.0 -Ic:/gtk/include/cairo -Ic:/gtk/include/gdk-pixbuf-2.0 -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/freetype2 -Ic:/gtk/include/libpng14 -Lc:/gtk/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl
the compiling line for version 3 (the one i'm asking) is:
gcc -Wall -g iniciando.c -o iniciando -mms-bitfields -IC:/gtk3/include/gtk-3.0 -IC:/gtk3/include/cairo -IC:/gtk3/include/pango-1.0 -IC:/gtk3/include/atk-1.0 -IC:/gtk3/include/cairo -IC:/gtk3/include/pixman-1 -IC:/gtk3/include -IC:/gtk3/include/freetype2 -IC:/gtk3/include -IC:/gtk3/include/libpng15 -IC:/gtk3/include/gdk-pixbuf-2.0 -IC:/gtk3/include/libpng15 -IC:/gtk3/include/glib-2.0 -IC:/gtk3/lib/glib-2.0/include -LC:/gtk3/lib -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lpangocairo-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
The last lib (intl), at the begining gave problems because it didn't exist where it's suppose to be, and nothing compiled; i removed it and got the error i'm asking for, then copied the intl from my GTK 2 (just to see what happened), the error is the same.
I expect the program to be compiled; but I am getting: undefined reference to: 'gtk_main_quit'
(and all GTK functions).