|
From: | Alex Zelid |
Subject: | Re: [Mingw-cross-env-list] Error building mxe/src/gtk2-test.c |
Date: | Tue, 9 Dec 2014 12:17:46 +0200 |
Hello,I found that MXE includes GTK2 and some sample mxe/src/gtk2-test.cAfter checking mxe/usr/i686-w64-mingw32.static/lib/pkgconfig I found that it has gdk-2.0.pc (sounds like gtk-2.0) why the name is gdk and not gtk?I tried to build it gtk2-test.c:i686-w64-mingw32.static-gcc -o example-0.exe example-0.c `i686-w64-mingw32.static-pkg-config --libs --cflags gdk-2.0`and:i686-w64-mingw32.static-gcc -o example-0.exe example-0.c `i686-w64-mingw32.static-pkg-config --libs --cflags gdk-win32-2.0`In both cases I got an error:In file included from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkcontainer.h:35:0,from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkbin.h:35,from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkwindow.h:36,from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkdialog.h:35,from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkaboutdialog.h:32,from /home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtk.h:33,from example-0.c:6:/home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/gtk-2.0/gtk/gtkwidget.h:40:21: fatal error: atk/atk.h: No such file or directory#include <atk/atk.h>^compilation terminated.Then I figured out that atk is in it's own subdirectory mxe/usr/i686-w64-mingw32.static/include/atk-1.0/atkSo I added additional include and compiled using:i686-w64-mingw32.static-gcc -I/home/alex/opt/mxe/usr/i686-w64-mingw32.static/include/atk-1.0 -o example-0.exe example-0.c `i686-w64-mingw32.static-pkg-config --libs --cflags gdk-2.0`That gives a new error:/tmp/ccLrOTA7.o:example-0.c:(.text+0x35): undefined reference to `gtk_init_abi_check'/tmp/ccLrOTA7.o:example-0.c:(.text+0x41): undefined reference to `gtk_window_new'/tmp/ccLrOTA7.o:example-0.c:(.text+0x51): undefined reference to `gtk_button_new_with_label'/tmp/ccLrOTA7.o:example-0.c:(.text+0x5a): undefined reference to `gtk_container_get_type'/tmp/ccLrOTA7.o:example-0.c:(.text+0x7c): undefined reference to `gtk_container_add'/tmp/ccLrOTA7.o:example-0.c:(.text+0xc2): undefined reference to `gtk_widget_destroy'/tmp/ccLrOTA7.o:example-0.c:(.text+0x106): undefined reference to `gtk_main_quit'/tmp/ccLrOTA7.o:example-0.c:(.text+0x122): undefined reference to `gtk_widget_show'/tmp/ccLrOTA7.o:example-0.c:(.text+0x12e): undefined reference to `gtk_widget_show'/tmp/ccLrOTA7.o:example-0.c:(.text+0x133): undefined reference to `gtk_main'collect2: error: ld returned 1 exit statusThat I don't know how to handle.Why we have name GDK instead of GTK and how to compile those simple GTK-2.0 sample?Thank you,Alex
[Prev in Thread] | Current Thread | [Next in Thread] |