On 3/30/22 8:33 PM, Tom Stellard wrote:
Looking at the builds with gcc, there is an extra option passed to gcc: -I./libs/zlib which is not passed to clang. So maybe this is an issue with the build system?
You may have looked at an older build as that is pointing to the bundled MinGW zlib. My latest build points to the Fedora mingw-zlib package instead.
The zlib.h file lives in the root /$MINGW_ROOT/usr/include path. MinGW gcc knows to look there first without needing an extra "-I" parameter.
$ x86_64-w64-mingw32-gcc -c test.c -v .. snip .. #include <...> search starts here: /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/include /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/include-fixed /usr/x86_64-w64-mingw32/sys-root/mingw/include End of search list.
Clang apparently has no idea where MinGW files in Fedora live. :(
$ clang -c test.c -target x86_64-windows -v .. snip .. #include <...> search starts here: /usr/lib64/clang/13.0.0/include End of search list.