Skip to content

Conversation

@oltolm
Copy link
Contributor

@oltolm oltolm commented Jan 6, 2026

I build xemu using MSYS2's UCRT64 environment and I use cmd instead of bash. This patch makes it build. There is also another patch for QEMU necessary, but I already submitted it upstream and it has been merged.

@oltolm oltolm force-pushed the win branch 2 times, most recently from d1b7d5d to 0781863 Compare January 6, 2026 21:17
@oltolm
Copy link
Contributor Author

oltolm commented Jan 22, 2026

I don't know why the python script was failing. I reverted the changes to the script and now it only has fixes for building with GCC.

@mborgerson
Copy link
Member

mborgerson commented Jan 23, 2026

Why is it necessary to move this include out of the extern "C" block? What is the error you're encountering when building? xemu is currently compiling with GCC 15 for Windows x86_64 on CI

@oltolm
Copy link
Contributor Author

oltolm commented Jan 23, 2026

This is the error

[7/31] Compiling C++ object libsystem.a.p/C__src_xemu_ui_xui_animation.cc.obj
FAILED: [code=1] libsystem.a.p/C__src_xemu_ui_xui_animation.cc.obj
"c++" "-m64" "-Ilibsystem.a.p" "-I." "-IC:\src\xemu" "-Ithirdparty\nvapi" "-IC:\src\xemu\thirdparty\nvapi" "-Isubprojects\imgui" "-IC:\src\xemu\subprojects\imgui" "-IC:\src\xemu\subprojects\imgui\backends" "-Isubprojects\implot" "-IC:\src\xemu\subprojects\implot" "-IC:\src\xemu\ui\thirdparty\stb_image" "-IC:\src\xemu\ui\thirdparty\fa" "-IC:\src\xemu\ui\thirdparty\fpng" "-IC:\src\xemu\ui\thirdparty\fatx" "-Isubprojects\tomlplusplus\include" "-IC:\src\xemu\subprojects\tomlplusplus\include" "-Isubprojects\genconfig" "-IC:\src\xemu\subprojects\genconfig" "-IC:\src\xemu\winpcap-loader\include" "-Iqapi" "-Itrace" "-Iui" "-Iui\shader" "-Idata" "-IC:/msys64/ucrt64/include/libusb-1.0" "-IC:/msys64/ucrt64/include/slirp" "-IC:/msys64/ucrt64/include/glib-2.0" "-IC:/msys64/ucrt64/lib/glib-2.0/include" "-fdiagnostics-color=auto" "-D_GLIBCXX_ASSERTIONS=1" "-Wall" "-Winvalid-pch" "-std=c++17" "-O2" "-g" "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-Wempty-body" "-Wendif-labels" "-Wexpansion-to-defined" "-Wformat-security" "-Wformat-y2k" "-Wignored-qualifiers" "-Wimplicit-fallthrough=2" "-Winit-self" "-Wmissing-format-attribute" "-Wredundant-decls" "-Wshadow=local" "-Wtype-limits" "-Wwrite-strings" "-Wno-missing-include-dirs" "-Wno-psabi" "-Wno-shift-negative-value" "-iquote" "." "-iquote" "C:\src\xemu" "-iquote" "C:/src/xemu/include" "-iquote" "C:/src/xemu/host/include/x86_64" "-iquote" "C:/src/xemu/host/include/generic" "-iquote" "C:/src/xemu/tcg/i386" "-mcx16" "-msse2" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-fno-strict-aliasing" "-fno-common" "-fwrapv" "-fno-pie" "-no-pie" "-ftrivial-auto-var-init=zero" "-fzero-call-used-regs=used-gpr" "-Wno-error" "-DTOML_HEADER_ONLY=0" "-Wno-undef" "-DIMGUI_API=" -MD -MQ libsystem.a.p/C__src_xemu_ui_xui_animation.cc.obj -MF "libsystem.a.p\C__src_xemu_ui_xui_animation.cc.obj.d" -o libsystem.a.p/C__src_xemu_ui_xui_animation.cc.obj "-c" C:/src/xemu/ui/xui/animation.cc
In file included from C:/msys64/ucrt64/include/glib-2.0/glib.h:107,
                 from C:/src/xemu/include/glib-compat.h:32,
                 from C:/src/xemu/include/qemu/osdep.h:175,
                 from C:/src/xemu/ui/xui/common.hh:36,
                 from C:/src/xemu/ui/xui/animation.cc:20:
C:/msys64/ucrt64/include/glib-2.0/glib/gwin32.h:178:1: error: template with C linkage
  178 | template <typename com_interface>
      | ^~~~~~~~
C:/src/xemu/ui/xui/common.hh:34:1: note: 'extern "C"' linkage started here
   34 | extern "C" {
      | ^~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants