Re: working version of GTK for win64
- From: Oleg Tchij <otchij newman bas-net by>
- To: "Tor Lillqvist" <tml iki fi>
- Cc: gtk-devel-list gnome org
- Subject: Re: working version of GTK for win64
- Date: Thu, 24 Jul 2008 14:48:56 +0300
On Thursday 24 July 2008 03:54:07 Tor Lillqvist wrote:
> > http://rapidshare.com/files/130142294/gtk-2.12.9-win64-src.tar.bz2.html
>
> A couple of questions about your changes in the source:
>
> In glib's configure.in, you do:
>
> --- ./configure.in.orig 2008-05-09 22:50:12.000000000 +0300
> +++ ./configure.in 2008-05-06 12:10:18.000000000 +0300
> @@ -871,6 +871,9 @@
> $ac_cv_sizeof_long)
> glib_size_type=long
> ;;
> + $ac_cv_sizeof_long_long)
> + glib_size_type=int64
> + ;;
> *) AC_MSG_ERROR([No type matching size_t in size])
> ;;
> esac
>
> What is this int64 type? Is it a predefined type in gcc for win64? Is
> it available also when more strict standard conformance is asked for?
> What about MSVC? Shouldn't __int64 be used instead? Or probably long
> long. Anyway, if you add a new possible value for glib_size_type, more
> changes are needed later in configure.in where it does a
First of all, configure script is used only for gcc and automake routines.
This part of script requires an predefined type in one word (!) which has the
size of "long long". In this case, int64 is correct answer for win32 and
win64.
>
> case $glib_size_type in
> ...
>
> I also notice that configure.in tests:
>
> case $ac_cv_sizeof_void_p in
> $ac_cv_sizeof_int) glib_gpi_cast='' glib_gpui_cast='' ;;
> $ac_cv_sizeof_long) glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;;
> *) glib_unknown_void_p=yes ;;
> esac
>
> Surely ac_cv_sizeof_void_p will be 8? Won't that then set
> glib_unknown_void_p=yes which will cause echo '#error SIZEOF_VOID_P
> unknown - This should never happen' ?
Currently my glibconfig.h is hand made for win64. If we fix SIZEOF_VOID_P at
the same time it will be good. Also we should use
#ifdef __cplusplus
#define G_HAVE_INLINE 1
#else /* !__cplusplus */
#ifndef _MSC_VER
#define G_HAVE_INLINE 1
#endif /* _MSC_VER */
#define G_HAVE___INLINE 1
#if !defined(_MSC_VER) && !defined(__DMC__)
#define G_HAVE___INLINE__ 1
#endif /* !_MSC_VER and !__DMC__ */
#endif /* !__cplusplus */
#define G_CAN_INLINE 1
instead of
#ifdef __cplusplus
#define G_HAVE_INLINE 1
#else /* !__cplusplus */
#define G_HAVE_INLINE 1
#define G_HAVE___INLINE 1
#define G_HAVE___INLINE__ 1
#endif /* !__cplusplus */
#ifdef __cplusplus
#define G_CAN_INLINE 1
#else /* !__cplusplus */
#define G_CAN_INLINE 1
#endif
for correct MSVC build of applications.
>
> I downloaded the 64-bit mingw cross-compiler (the one hosted on 32-bit
> Windows) and tested cross-compiling. But actually I really should
> install 64-bit XP or Vista on some suitable machine. Not that I have
> that many to choose from.. it will have to be the one in the living
> room that mostly acts as a media machine now.
>
> I committed a change to configure.in in trunk that (as far as I can
> see) when run using 64-bit mingw produces a correct glibconfig.h that
> matches rhult's patch in this thread. I still need to go through your
> changes and commit them as such or slightly modified. I will also make
> sure it compiles for 64 bits without warnings.
In any case during compilation we'll have a lot of warnings about INT to
POINTER conversions. But whenever the value of int less than 2^32 it works
correctly for win64.
>
> --tml
Oleg Tchij
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]