I installed LLVM on windows (through the official installer) and I generate my project with the mingw-makefile generator (as I installed gcc through mingw).
This fails with folllowing error during the compiler test stage (on the project command):
Base on a strange ChatGPT answer, I added set(CMAKE_SYSTEM_NAME Linux) just before the project command.
Doing I can generate a makefile but when I launch the build (with make from MinGW), on iostream inclusion in my code, I’ve got the following error:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include\iostream:9:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include\yvals_core.h:784:1: error: static_assert failed
“Error in C++ Standard Library usage.”
_EMIT_STL_ERROR(STL1000, “Unexpected compiler version, expected Clang 14.0.0 or newer.”);
I, indeed, have an older clang (12) and windows smartscreen is blocking installation of more recent versions.
Yet I don’t understand why I’m including a standard library from visual studio build tools.
Especially when I’d like to compile with -stdlib=libc++ option, but clang issues:
warning: argument unused during compilation: ‘-stdlib=libc++’