Re: Compiling on Windows...At ALL



Hello Jason,

I have the same problem with gtkmm 3 on Windows and have no solution. With 
gtkmm 2.4 I get working code. I have the , the problem is not in gtkmm but in 
gtk:

First I install the i686-version of msys2 (from https://msys2.github.io/: 
msys2-i686-20150916.exe). Then I update the core packages:
$ update-core
Now I restart msys2 and update all packages:
$ pacman --noconfirm -Syu
Then I install all packages I need:
$ pacman --noconfirm -S mingw-w64-i686-libc++
$ pacman --noconfirm -S mingw-w64-i686-gtkmm3
$ pacman --noconfirm -S mingw-w64-i686-gtkmm
$ pacman --noconfirm -S pkg-config
I make the pkg-files of gtkmm visible for pkg-config
$ export PKG_CONFIG_PATH=/mingw32/lib/pkgconfig
And I put gcc into the path
$ export PATH=/mingw32/bin:$PATH

Now a simple example with gtk:
$ cat << EOF > hello_gtk.c
  #include <gtk/gtk.h>
  int main(int argc, char *argv[])
  {
    GtkWidget *window;
    gtk_init (&argc, &argv);
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show(window);
    gtk_main();
    return 0;
  }
EOF
Compiling works (same code, different version of the libs)
$ gcc hello_gtk.c -o hello_gtk2.exe `pkg-config --cflags --libs gtk+-2.0` 
$ gcc hello_gtk.c -o hello_gtk3.exe `pkg-config --cflags --libs gtk+-3.0` 
But only the 2er version runs:
$ ./hello_gtk2.exe
$ ./hello_gtk3.exe

I have testet in Windows XP 32 bit (in a virtual machine), there I need the 
dwmapi.dll for the 3er version. That dll first appears with Vista, so I took 
the (dummy) one from wine.

Greetings
Diether

Attachment: signature.asc
Description: This is a digitally signed message part.



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