Re: newbi: Problems to Link Gtk on Windows98

The docs I read said that in order to use the precompiled gtk from Lillqvist's site you
must use Microsoft's Visual C++, and that certainly worked for me.

At 10:41 AM 3/28/2002 +0100, Boris Fiedler wrote:
>i try to compile and linking on win98 with minigw (i installed
>Bloodshed Dev-C++ 4.0) and gtk 2.0 the hello world programm.
>#include <gtk/gtk.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;
>If i try: gcc test.c -o test.exe `pkg-config --cflags --libs
>It doesn't work, because windoof or gcc can't start pkg-config.
>So I make a batchfile with the output filepath for pkg-config --cflags
>gtk+-win32-2.0 and pkg-config --libs gtk+-win32-2.0
>My Batchfile is:
>gcc test.c -o test.exe -IE:/GTK/include/gtk-2.0
>-IE:/GTK/lib/gtk-2.0/include -IE:/GTK/include/atk-1.0
>-IE:/GTK/include/pango-1.0 -IE:/GTK/include/glib-2.0
>-IE:/GTK/lib/glib-2.0/include -LE:/GTK/lib --library gtk-win32-2.0.lib
>--library gdk-win32-2.0.lib --library atk-1.0.lib --library
>gdk_pixbuf-2.0.lib --library m.lib --library pangowin32-1.0.lib
>--library gdi32.lib --library pango-1.0.lib --library gobject-2.0.lib
>--library gmodule-2.0.lib --library glib-2.0.lib --library intl.lib
>--library iconv.lib
>So compiling works, but not linking with this error-mesage:
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x1b):test.c: undefined reference to
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x28):test.c: undefined reference to
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x3c):test.c: undefined reference to
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x44):test.c: undefined reference to
>Can anybody help me.
>Thank you
>gtk-list mailing list
>gtk-list gnome org

--           Philip J. Bunce, Software Consultant
--     MIPS Assembly, Embedded Systems, PMON, UNIX, & C
--  Ph: 831-659-5684 Fax: 501-325-6812

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]