Win32 (MSVC) missing include
Hi,
The auto-generated resources files (see the calls to gnome.compile_resources
in the meson.build
files) have a #include "gslist.h"
in them. Unfortunately, on Windows, when compiling with MSVC, it can seem to find it.
FAILED: src/adwaita-1-0.dll.p/meson-generated_.._adw-resources.c.obj
"cl" "-Isrc\adwaita-1-0.dll.p" "-Isrc" "-I..\src" "-I." "-I.." "-Isrc\stylesheet" "-IC:/gnome/include/glib-2.0" "-IC:/gnome/lib/glib-2.0/include" "-IC:/gnome/include/fribidi" "-IC:/gnome/include" "-IC:/gnome/include/gtk-4.0" "-IC:/gnome/include/pango-1.0" "-IC:/gnome/include/harfbuzz" "-IC:/gnome/include/gdk-pixbuf-2.0" "-IC:/gnome/include/cairo" "-IC:/gnome/include/freetype2" "-IC:/gnome/include/pixman-1" "-IC:/gnome/include/graphene-1.0" "-IC:/gnome/lib/graphene-1.0/include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W2" "/std:c11" "/O2" "/Zi" "-DHAVE_CONFIG_H" "-DADWAITA_COMPILATION" "-DG_LOG_DOMAIN=\"Adwaita\"" "/Fdsrc\adwaita-1-0.dll.p\meson-generated_.._adw-resources.c.pdb" /Fosrc/adwaita-1-0.dll.p/meson-generated_.._adw-resources.c.obj "/c" src/adw-resources.c
src/adw-resources.c(6781): fatal error C1083: Cannot open include file: 'gslist.h': No such file or directory
Looking at the error message, I can see a bunch of include directories, and one of those is /gnome/include/glib-2.0
. The thing is, that file (gslist.h
) is in a sub-directory : /gnome/include/glib-2.0/glib
. So, I've cloned the project to see if I could do something about it, and after 3-4 hours, the only thing I could do to make it build was to add extra_args: '--manual-register'
to the gnome.compile_resources
calls, but that's not the right solution since it literally breaks everything at runtime.
libadwaita_resources = gnome.compile_resources(
'adw-resources',
'adwaita.gresources.xml',
c_name: 'adw',
extra_args: '--manual-register', <==== Added this
)
(sandbox2.exe:2080): Gtk-WARNING **: 15:17:21.204: Theme parser error: <broken file>:1:1:
The resource at ?/org/gnome/Adwaita/styles/base.css? does not exist <==== Produces this when running an app
I can feel that I'm so close to make it work, but I can't seem to solve that include problem. Any idea where I should look ? I'll be happy to contribute on that front in my limited spare time.
Have a nice day. Thanks for your hard work.