Skip to content

build(win): compile eq_base with mingw-w64 - #19

Merged
Force67 merged 1 commit into
devel5from
mingw-cross-build
Sep 19, 2026
Merged

Force67 merged 1 commit into
devel5from
mingw-cross-build

Conversation

@Force67

@Force67 Force67 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Lets eq_base build with the mingw-w64 cross toolchain. Verified by cross-compiling from Linux and running a dependent project's test suite under Wine (151 tests, all passing). The Linux build is unaffected: every change is behind OS_WIN or in a _win.cc file.

MinGW ships its Windows headers lowercase, so <Windows.h>, <Shlwapi.h> and <Wincrypt.h> are not found when cross-compiling from a case-sensitive filesystem. MSVC resolves either spelling, so lowercasing is safe both ways. That is 10 of the 12 files.

The remaining two changes are both in base/win/minwin.h:

  • It needs <_mingw.h> before it typedefs __int64. That is an MSVC keyword, and on MinGW it only arrives through that header, so without it every typedef below it collapses.
  • Sleep was never declared, even though base/threading/thread_pool.cc calls ::Sleep(1). This one is not toolchain-specific and applies to MSVC too, which makes me wonder whether the Windows ThreadPool path is currently exercised anywhere.

Rebased onto current devel5. Two fixes that were in the first push turned out to be already upstream (the base:: qualification in virtual_memory_win.cc and the platform_file.h include), so they are dropped and this is now 12 files rather than 13.

MinGW ships its Windows headers lowercase, so <Windows.h>, <Shlwapi.h>
and <Wincrypt.h> are not found when cross-compiling from a
case-sensitive filesystem. MSVC resolves either spelling.

minwin.h needs <_mingw.h> before it typedefs __int64, which is an MSVC
keyword that MinGW only provides through that header; without it every
typedef below it collapses. It was also missing a Sleep declaration
despite thread_pool.cc calling it, which affects MSVC too.
@Force67
Force67 merged commit 3cd4055 into devel5 Sep 19, 2026
6 checks passed
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.

1 participant