Re: [gtk-list] win32 install info
- From: "Øystein O Johansen" <OJOHANS statoil com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] win32 install info
- Date: Wed, 28 Jul 1999 12:47:51 +0100
--------->--------->--------->--------->--------->--------->--------->-----
---->
>Hi,
>
>I'm new to using gtk and cannot find any websites or info that describe
the
>installation process for win32. The FAQ only says to run the .\configure
script
>but this is for Linux. I'm trying to set things up by trial and error but
any
>info would be appreciated.
>
>-Bil
Which compiler are you using? I installed gtk+ on a WinNT 4.0 computer,
with
Cygwin-B20.1. Of course it is possible to use other compilers, but I have
not
tried this. This is what I did:
1. Downloaded from http://user.sgic.fi/~tml/gimp/win32/ the files
glib-1.2-dev-19990228.zip
gtk-dev-19990305.zip
(I can see this files have been updated, you should get the files
glib-dev-19990726.zip and gtk+-dev-19990726.zip)
2. Unzip the files. (easy)
3. Copy all the *.dll files to c:\WinNT\system\
4. Hey! The new zipfiles contain lib*.a files!! You do not have to create
them from the DLL's!! Thanks Tor!
5. Copy all the lib*.a files to a directory your linker will find them.
I have copied this files to c:\cygnus\cygwin-b20\H-i586-cygwin32\lib\.
If you are using an other compiler then Cygwin, find another suitable
directory.
6. Copy all the *.h files to a directory your compiler will find them.
I have copied this headerfiles to tree subdirectories under
c:\cygnus\cygwin-b20\include\ called gtk, gdk and glib.
7. Do a small test, like 'Hello World'
gcc hello.c -o hello -lgdi32 -lkernel32 -lglib -lgdk -lgtk -lm
8. Try to run this. I can see that gtk.dll has gnu-intl.dll in it's
Import table. This DLL can be found in the file
extralibs-src-19990726.zip
from the same site. (This is new since last time I tried this. Now I
understand your other posting to this list!) Extract the file
gnu-intl.dll
and put it in c:/WinNT/system/. Does your test program work now?
9. (gcc only) This is just a dirty trick. Find the gtk-config script, and
modify this so `gtk-config --libs` gives a output like this:
-lgdi32 -lkernel32 -lglib -lgdk -lgtk -lm
and so `gtk-config --cflags` gives a output of the include directories.
(my gtk-config script i provided below). Put this modified script in
your
path. I got a directory /usr/local/bin/ for such scripts.
Some comments.
- If you are using MSVC, I guess you can link against the *.lib files
instead.
- Sometimes I see that the order of the link arguments does matter. I do
not
know why.
- I do not know why Tor Lillqvist have compiled gtk.dll depending on
gnu-intl.dll. The only two function in the import table is
bindtestdomain__
and dgettext__. It didn't use to be like this.
- Even with a modified gtk-config script, you must be prepered to modify a
lot of Makefiles!!
This is just what _I_ did, to install gtk+ om _my_ computer. Some this may
be stupid. Please send me commets if something is really stupid or if
anything goes wrong.
Good luck,
Øystein Johansen
------gtk-config------
#!/bin/sh
# Skriptet er modifisert av meg!
glib_libs="-L/store/lib -lgmodule -lglib -Wl,-rpath,/store/lib"
glib_cflags="-I/store/lib/glib/include -I/store/include"
glib_thread_libs="-L/store/lib -lgmodule -lgthread -lglib
-Wl,-rpath,/store/lib"
glib_thread_cflags="-I/store/lib/glib/include -I/store/include"
prefix=/store
exec_prefix=${prefix}
exec_prefix_set=no
usage()
{
cat <<EOF
Usage: gtk-config [OPTIONS] [LIBRARIES]
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
Libraries:
gtk
gthread
EOF
exit $1
}
if test $# -eq 0; then
usage 1 1>&2
fi
lib_gtk=yes
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo_prefix=yes
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo_exec_prefix=yes
;;
--version)
echo 1.3.0
;;
--cflags)
echo_cflags=yes
;;
--libs)
echo_libs=yes
;;
gtk)
lib_gtk=yes
;;
gthread)
lib_gthread=yes
;;
*)
usage 1 1>&2
;;
esac
shift
done
if test "$echo_prefix" = "yes"; then
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
fi
if test "$lib_gthread" = "yes"; then
glib_cflags="$glib_thread_cflags"
glib_libs="$glib_thread_libs"
fi
if test "$echo_cflags" = "yes"; then
if test ${prefix}/include != /usr/include ; then
includes=-I${prefix}/include
for i in $glib_cflags ; do
if test $i = -I${prefix}/include ; then
includes=""
fi
done
fi
echo
fi
if test "$echo_libs" = "yes"; then
my_glib_libs=
libdirs=-L${exec_prefix}/lib
for i in $glib_libs ; do
if test $i != -L${exec_prefix}/lib ; then
if test -z "$my_glib_libs" ; then
my_glib_libs="$i"
else
my_glib_libs="$my_glib_libs $i"
fi
fi
done
echo -lglib -lgdi32 -lkernel32 -lgtk -lgdk -lm
fi
------gtk-config------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]