I successfully installed gtk:x86-windows 4.6.8 by vcpkg. Then, I created a console application in Visual Studio 2022 on Windows 11 and added additional include directories as D:\Resources\vcpkg\installed\x86-windows\include\pango-1.0;D:\Resources\vcpkg\installed\x86-windows\include\cairo;D:\Resources\vcpkg\installed\x86-windows\include\gtk-4.0;D:\Resources\vcpkg\installed\x86-windows\include\glib-2.0;D:\Resources\vcpkg\installed\x86-windows\include\gio-win32-2.0;D:\Resources\vcpkg\installed\x86-windows\lib\glib-2.0\include;D:\Resources\vcpkg\installed\x86-windows\include\gdk-pixbuf-2.0;D:\Resources\vcpkg\installed\x86-windows\include\graphene-1.0;D:\Resources\vcpkg\installed\x86-windows\lib\graphene-1.0\include;D:\Resources\vcpkg\installed\x86-windows\include\harfbuzz;%(AdditionalIncludeDirectories)
to make the header files included in <gtk-4.0/gtk/gtk.h>
available. Then I ran a minimal example from ToshioCP's GTK4 Tutorial by Local Windows Debugger with Debug x86 mode:
#include <gtk-4.0/gtk/gtk.h>
int
main(int argc, char** argv) {
GtkApplication* app;
int stat;
app = gtk_application_new("com.github.ToshioCP.pr1", G_APPLICATION_DEFAULT_FLAGS);
stat = g_application_run(G_APPLICATION(app), argc, argv);
g_object_unref(app);
return stat;
}
But it failed
vsdebugwindow screenshot at gdataset.c
.
I've tried to switch to the Release mode but the problem still occurs. I've also tried other examples from gtk.org and the problem always occurs. The Autos shows that the value of d->len
is <Unable to read memory>
.
Anyone has a hint?