GTK4 i686 problem windows10

Hello
Recently I decide to try GTK4 (currently I am using wxWidgets, but now i need something with more modern feel and look).

I’m working on Windows 10 Pro 64bit

I get library directly from MSYS:

pacman -S mingw-w64-i686-gtk4

Succesfully i compile example with mingw32 (path variable have C:\msys64\mingw32\bin):

gcc pkg-config --cflags gtk4 -o test test_c.c pkg-config --libs gtk4

test_c.c:

#include <gtk/gtk.h>
static void
activate (GtkApplication* app, gpointer user_data)
{
GtkWidget *window;
window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), “Window”);
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
gtk_widget_show (window);
}
int main (int argc, char **argv)
{
GtkApplication *app;
int status;

app = gtk_application_new (“org.gtk.example”, G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, “activate”, G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);

return status;
}

But aplication won’t run:

Przechwytywanie

So i decide to try x64 version:

pacman -S mingw-w64-x86_64-gtk4

and compile with mingw64 (path variable now have C:\msys64\mingw64\bin):

gcc pkg-config --cflags gtk4 -o test test_c.c pkg-config --libs gtk4

and application sucessfully run.

Also i try to use mingw32 and GTK3 :

gcc pkg-config --cflags gtk+-3.0 -o test test_c.c pkg-config --libs gtk+-3.0

and application sucessfully run.

Is it possible to run GTK4 32 bit application on 64 bit machine?

It would be nice if you translated the error message to English, so that other people can read it.

In any case, it seems that there’s something wrong with the 32bit build on MSYS2 that relates to Vulkan. You should file a bug on the MSYS2 issue tracker.

The procedure entry point vkAcquireNextImageKHR could not be located in the dynamic linked library C:/msys64/mingw32/bin/libgtk-4-1.dll

I’d recommend building GTK4 without Vulkan support on 32bit Windows; but that can only be done by either you or by the MSYS2 packagers.

waiting for update…

Hi! Did you do any partial upgrade in MSYS2? This could be one of the reasons why the procedure cannot be found.

If you type the command:

pacman -Q mingw-w64-i686-vulkan-loader

What version do you get? It should be 1.2.179-2

gtk4 has been updated two days ago :slight_smile:

It could be worth trying an upgrade to see if the issues are fixed:

pacman -Syu

(You might need to run it two times, as explained in https://www.msys2.org/)

1 Like

tomorrow i will check everything :slight_smile:

obraz

Now everything looks great! Application run. Is there possibilty to check build configuration of library?

Good! Yep, see MINGW-packages/mingw-w64-gtk4 at master · msys2/MINGW-packages · GitHub

So it is build as release and vulkan enable by default is it right?

Yes! :rocket:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.