RE: Gtk+ 3.0 and MS Windows



Maarten:

1)
I was not exactly mixing different sources of windows binaries. I just tried different approaches on how I can get binary GTKMM 2.99 for MSVC in the fastest way.

2)
I can't build Gtk+ 3.0.6 (& 3.0.5) from the source against OpenSUSE binaries for some reason as I get some weird errors like

c:\gtkmm3\include\glib-2.0\glib\gutils.h(146) : error C2143: syntax error : missing '{' before 'const'

I have OpenSUSE binaries in c:\gtkmm3\ . But Gtk+ 3.0.5 builds just fine against binaries from gnome project's ftp if I add libmsvcrt.a from MinGW into gtk-demo project. Also I had to change path to demos in main.c around line 48 as it points to old gtk.

3)
I was able to link and run successfully very simple tests against OpenSUSE binaries for Glib with MS VC++ 2008. Although I had also to link against libmsvcrt.a from MinGW as by default it was linking against another runtime library as was correctly pointed by Fan. Without it, simple IO with g_fopen() and fgets() were failing.

4)
However I completely forgot that OpenSUSE binaries and MSVC++ can work for good old plain C only as C++ name mangling is different between compilers. As a result, to get GTKMM I have to follow instructions http://live.gnome.org/gtkmm/MSWindows/BuildingGtkmm (Now I know why there is a delay in a binary release :-) ). It all was built and linked correctly, however for some reason resulting glibmm dll is broken as it is looking for GModule's export in Glib's dll which is nonsense. So I can't run simple example that calls "Glib::Module::get_supported();" , but plain old C interface to Glib like "g_module_build_path()" works just fine. I don't know what messes up libs. Oh well.. it is outside of the scope of this list :-)

Mikhail

-----Original Message-----
From: Maarten Bosmans [mailto:mkbosmans gmail com] 
Sent: Sunday, March 27, 2011 2:08 PM
To: Gtk+ list
Cc: Mikhail Titov
Subject: Re: Gtk+ 3.0 and MS Windows

2011/3/25 Mikhail Titov <mlt gmx us>:
> Maarten:
>
> Thanks again! It worked like magic. I'm not sure if I was supposed to get a bunch of dot cpio files in cache/extracted/ folder. I have 7-zip 9.20. Anyway I selected all of them and did "7-zip -> extract here" from explorer. However when I try to run demo I get the following message.

That's great. The rpm indeed contain a cpio file, so you have to unpack twice. The script I sent the link to does this for you.

> -----------------8<------------------
>
> C:\...che\extracted\usr\i686-w64-mingw32\sys-root\mingw\bin>gtk3-demo.
> exe
> **
> Gtk:ERROR:gtksettings.c:558:gtk_settings_class_init: assertion failed: 
> (result == PROP_ALTERNATIVE_BUTTON_ORDER)
>
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>
> -----------------8<------------------
>
> Is there something missing, or is it a known issue? It doesn't matter if I change gtk-alternative-button-order to 1 or 0 in gtkrc of MS-Windows theme.

If I understand your other mail correctly, you are combining binaries from OBS and those provided on ftp.gnome.org. I'm not entirely sure, but it could be that gives problems. So try downloading all dependencies from OBS. The script I sent the link to does this for you.

> Mikhail

So you also got your own build going, great! You may also want to try downloading -devel packages of the dependencies from the OBS for linking your own build of Gtk+ 3. Not sure that would give better results though.

Maarten



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