Re: GTK 1.2 -> 1.3? (was Re: GTK+ 1.2.x on Win32?)



At 01:36 PM 4/6/2002 -0800, Taura Milana wrote:
Hi,

  I read http://www.gimp.org/~tml/gimp/win32/ and it
suggests to use GTK 1.3, so I was wondering if there
are any tutorials on porting GTK 1.2 to 1.3?  Also
the web page did not mention where to get the
.dll's and .lib's (or I couldn't find them) does
anyone know?

As I understand it. Gimp has not been ported to the 2.0 API. You must use 1.2.
GTK 1.3 is AKA GTK 2.0. It was called 1.3 until it reached release.
The files I downloaded and installed were.

atk-1.0.0-20020310.zip
atk-dev-1.0.0-20020310.zip
glib-2.0.0-20020310.zip
glib-dev-2.0.0-20020310.zip
gtk+-2.0.0-20020310.zip
gtk+-dev-2.0.0-20020310.zip
libiconv-1.7.zip
libiconv-dev-1.7.zip
libintl-0.10.40-20020101.zip
libjpeg-6b.zip
libpng-1.2.0.zip
libtiff-3.5.6-beta.zip
pango-1.0-20020312.zip
pango-dev-1.0-20020310.zip
pkgconfig-0.11-20020310.zip
zlib-1.1.3.zip

which I just unzipped into a new directory.
They all came from Tor Lillqvist's site (follow the win32 link on www.gtk.org).

I did run into a couple of small problems.

1. The pkg-config program seems to have some problems. Even if you specify --msvc-syntax, the library names
it emits are wrong. 

232 D% pkg-config --msvc-syntax --libs gtk+-2.0
 /libpath:d:/win-gtk2/lib gtk-win32-1.3.lib gdk-win32-1.3.lib imm32.lib shell32.
lib ole32.lib uuid.lib atk-1.0.lib gdk_pixbuf-1.3.lib m.lib pangowin32-1.0.lib g
di32.lib pango-1.0.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib ico
nv.lib

You can't use this without changing the 3 instances of 1.3 to 2.0.
The resulting makefile for msvc will look something like this.

GTK = d:/win-gtk2
CFILES = <your .c files go here>

OFILES = $(CFILES:.c=.obj)
CC = cl /nologo

CFLAGS = -I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
        -I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
        -I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include

LIBS = /link /libpath:$(GTK)/lib gtk-win32-2.0.lib gdk-win32-2.0.lib \
        imm32.lib shell32.lib ole32.lib uuid.lib atk-1.0.lib \
        gdk_pixbuf-2.0.lib \
        pangowin32-1.0.lib gdi32.lib pango-1.0.lib gobject-2.0.lib \
        gmodule-2.0.lib glib-2.0.lib intl.lib iconv.lib

.c.obj:
        $(CC) -c $(CFLAGS) $<

yourprog.exe : $(OFILES)
        $(CC) -o $@ $(OFILES) $(LIBS)


$(OFILES) : Makefile

You will also need to make sure that $(GTK)/bin and $(GTK)/lib are in your command search path.
This creates a dynamically-linked executable, so you will need to install the dll's to run this executable.
The docs (which you can get by downloading the source package from www.gtk.org contain a guide for
porting from 1.2 to 2.0.




--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                 http://furry.ao.net/~learfox/


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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





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