To solve my problem here with Checked C Clang, from this post I figured out that first I should add the compiler to the environment system variables path:
set PATH=%PATH%;"C:\tools\msys64\mingw64\bin"
then compile the file with
clang <fileName>.c --verbose -target x86_64-pc-windows-gnu
which didn't help. For some reason it looks for the Mingw include folders in a strange place:
ignoring nonexistent directory "C:\Program Files\CheckedC-Clang\x86_64-w64-mingw32/sys-root/mingw/include"
ignoring nonexistent directory "C:\Program Files\CheckedC-Clang\x86_64-w64-mingw32\include"
I also tried to add the Mingw-w64 include folder:
clang <fileName>.c --verbose -target x86_64-pc-windows-gnu -I"C:\tools\msys64\mingw64\include"
to no avail. It fails to find the stdio.h
header file even when searching the folder!
#include <...> search starts here:
C:\tools\msys64\mingw64\include
I would appreciate it if you could help me know what should I do so Clang can find the Mingw-w64 GCC headers installed via MSYS2.