Repository navigation
includes not found on MSYS2 #524
Description
Activity
CC @glankk
The issue is that
CreateFileA()fails because it gets a MSYS/Cygwin path (e.g./s/path/a.h) and not a Windows one (e.g.S:/path/a.h).Simply converting this a to the proper syntax is not sufficient since the path could be internal to MSYS2 (e.g.
/tmp/path/a.h) which is the case in the failing tests.We also need to run tests for such binaries inside a regular
cmd(if possible).Related to this, there is currently some ambiguity in the windows and windows-adjacent code due to the
SIMPLECPP_WINDOWSmacro that is defined in various circumstances. I think the correct way to handle windows code is to get rid ofSIMPLECPP_WINDOWSand use_WIN32as the source of absolute truth. When targeting the cygwin/msys runtime (not mingw32/64) then the posix code should suffice, and ideally we shouldn't ever need to check__CYGWIN__or__MINGW32__.I was thinking the same. Probably need to add a Cygwin workflow as well.
integration-tests.pypasses on msys2 mingw when run withmingw-w64-*-pythonwhich uses windows paths. I think that is the correct approach to fix this issue. The_WIN32change described above seems to fix the msys/cygwin issues, I'll make a PR with that. There's still some issues with compiler warnings and libc++ linking with clang. See my mingw-ci fork; https://github.com/glankk/simplecpp/tree/mingw-ci.While at it we could also add
#define WIN32_LEAN_AND_MEANbefore the include.I guess that assertions might not work with MinGW - or maybe we need the
CLANG64build. Will do some tests later.And we should still have tests where non-Windows are being used. No idea if by shell or "wrong" Python interpreter.
And maybe get #438 merged first as well.
It only links with
libc++when usingCLANG64. I will update the workflow.I updated the workflow. Please post only your source changes (I would like to keep the warnings stuff to the commit where it actually appears) as a PR.
Done, see #531.
- added 7 commits that reference this issue
on Sep 11, 2025 - added a commit that references this issue
on Sep 21, 2025
Encountered while working on #475.
./simplecpp $(pwd)/a.cppThis causes most of
integration-tests.pyto fail on MinGW/MSYS.