Skip to content

Cannot compile Windows RC file with Meson git #15206

@lb90

Description

@lb90

Describe the bug

Compiling GLib on Windows with MSVC fails with the following error:

Compiling C object glib/glib.rc_i.p/glib.rc.i
FAILED: glib/glib.rc_i.p/glib.rc.i
"cl" "/EP" "/P" "-Iglib\glib.rc_i.p" "-Iglib" "-I..\glib\glib" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W4" "/O2" "/Z7" "/FIglib/msvc_recommended_pragmas.h" "/utf-8" "-D_GNU_SOURCE" "-DUNICODE" "-D_UNICODE" "-DG_ENABLE_DEBUG" "/wo4057" "/wd4068" "/wo4090" "/wd4100" "/wd4116" "/wo4125" "/wd4127" "/wd4146" "/wd4152" "/wd4201" "/wd4232" "/wo4245" "/wo4267" "/wd4334" "/wo4389" "/wo4702" "/wd4706" "-DRC_INVOKED" "/Fdglib\glib.rc_i.p\glib.rc.pdb" /Figlib/glib.rc_i.p/glib.rc.i "/c" glib/glib.rc
glib.rc
glib/glib.rc: fatal error C1083: Cannot open include file: 'glib/msvc_recommended_pragmas.h': No such file or directory
ninja: build stopped: subcommand failed.

To Reproduce

  • Open either CMD or PowerShell
  • python C:\path\to\meson-git\meson.py setup ..\glib --vsenv
  • python C:\path\to\meson-git\meson.py compile

Expected behavior

Compilation should succeed as in Meson 1.9.1

system parameters

  • Native build
  • Windows 11
  • Python 3.14
  • Meson master
  • ninja 1.13.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions