mingw-cross-env-list
[Top][All Lists]
Advanced

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

[Mingw-cross-env-list] gtk3 crash on Win7 (64bits), please help ...


From: KC
Subject: [Mingw-cross-env-list] gtk3 crash on Win7 (64bits), please help ...
Date: Tue, 6 Nov 2018 22:01:40 +0800

Hi,

I had MXE build successfully on CentOS 7 which I used for a long time
without any problem with Gtk2.

Recently, I try Gtk3 use the following commands:

    x86_64-w64-mingw32.static-gcc -mms-bitfields hello.c \
        `x86_64-w64-mingw32.static-pkg-config --cflags --libs gtk+-3.0` -o hello.exe

or
    i686-w64-mingw32.static-gcc -mms-bitfields hello.c \
        `i686-w64-mingw32.static-pkg-config --cflags --libs gtk+-3.0` -o hello.exe

where hello.c is a simple app. which has only one button (It run well when compile with Gtk2).
The hello.exe can run by WINE.  But when I copy it to 64bits Win7, it crash !!!
Anyone has similar problem ?


NOTE: it can't run on WinXP neither, but I believe that's because Gtk3 no longer support WinXP.

The following is hello.c:

#if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
#  include <windows.h>
#else
#  include <unistd.h>
#endif

#include <gtk/gtk.h>

int
main(int argc, char *argv[])
{
    GtkWidget *win, *button;

    gtk_init(&argc, &argv);
    win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    button = gtk_button_new_with_label("Hello");

    gtk_container_add(GTK_CONTAINER(win), button);

    gtk_widget_show_all(win);
    gtk_main();

    exit(0);
}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]