I try to understand something to the behaviour of GCC, and like i know they are numerous users of the "big father" of PB here , i ask this question, because i have search a long time and that not always works
I want to have a windows GCC the most portable (Usb key) possible.
And i have not really understand how adding a library like GTK+ for example in portable version of C
So i have download "MinGW_6_3_0" in ZIP format, uncompresse it in the C:\
And do the same thing with "gtk+-bundle_2.24.10-20120208_win32" beside "MinGW" on C:\
I want try this simple code in "Fenetre_GTK_WIN.c" file :
Code: Select all
#include <gtk/gtk.h>
#include <pango/pango.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <atk/atk.h>
int main( int argc, char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
Code: Select all
SET PATH=C:\MinGW\bin;%PATH%;
SET PATH=C:\gtk+;%PATH%
C:\MinGW\bin\gcc -o C:\CompilerEnC\Fenetre2_GTK_WIN.exe C:\CompilerEnC\Fenetre2_GTK_WIN.c -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/freetype -IC:/gtk+/include/libpng14 -LC:/gtk+/lib -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
Is it the good way ?Compiler GCC wrote:C:\Users\Administrateur\AppData\Local\Temp\ccN9bwVz.o:Fenetre2_GTK_WIN.c:(.text+
0x34): undefined reference to `gtk_init_abi_check'
C:\Users\Administrateur\AppData\Local\Temp\ccN9bwVz.o:Fenetre2_GTK_WIN.c:(.text+
0x40): undefined reference to `gtk_window_new'
C:\Users\Administrateur\AppData\Local\Temp\ccN9bwVz.o:Fenetre2_GTK_WIN.c:(.text+
0x50): undefined reference to `gtk_widget_show'
C:\Users\Administrateur\AppData\Local\Temp\ccN9bwVz.o:Fenetre2_GTK_WIN.c:(.text+
0x55): undefined reference to `gtk_main'
collect2.exe: error: ld returned 1 exit status
Have i missing something to do ?
Thanks and have a good day