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



On 2002.04.06 14:04 Philip Bunce wrote:

  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.

Thanks, I found the files.  Do I *and* my end users need to
install the runtime dll's?

Do I need to use any of the GTK 2.0 runtimes or just the
GTK 1.3 (there were no GTK 1.2's)?


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.

I'm afraid I'm really confused at this point. All I know
how to do in VC++ is add certain .lib files to my `project',
kind of like how I use -l<library> in gcc.  Where or how
exactly do I run pkg-config?


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.

I'm afraid I'm really lost at this point. I know how to
add the above to a Makefile since it looks like a typical
UNIX Makefile, but I don't know where to add the above text
to?  Please keep in mind that I although I'm fluent in working
with Linux, it's only been a few weeks using VC++.


--
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/



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