RE: newbi: Problems to Link Gtk on Windows98



Mingw works for me with precompiled 2.0 package,
but I also use a Cygwin shell and gnu-make.

Curiously, my 'pkg-config --libs gtk+-win32-2.0' gives
a more gcc-like output:
... -lgtk-win32-2.0 -lgdk-win32-2.0 ... etc.
which links through the dlls.
I don't think it uses the *.lib files. Are you trying to link statically?
Are you sure you haven't mixed up --mscv-syntax?

Cameron.

-----Original Message-----
From: Philip Bunce [mailto:pjb carmel com]
Sent: Friday, 29 March 2002 1:26 AM
To: Boris Fiedler t-online de; gtk-list gnome org
Subject: 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:
>Hello,
>
>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.
>
>...
>If i try: gcc test.c -o test.exe `pkg-config --cflags --libs
>gtk+-win32-2.0`
>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
>`gtk_init_
>abi_check'
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x28):test.c: undefined reference to
>`gtk_windo
>w_new'
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x3c):test.c: undefined reference to
>`gtk_widge
>t_show'
>C:\WINDOWS\TEMP\cc19Tdgb.o(.text+0x44):test.c: undefined reference to
>`gtk_main'
>
>Can anybody help me.
>Thank you



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