MINGW-packages: after most recent update clang++ cannot find standard library include files
After most recent update my build script fails when trying to include standard c++ library files.
$ clang --version clang version 13.0.1 Target: x86_64-w64-windows-gnu Thread model: posix InstalledDir: C:/msys64/clang64/bin
Here is the simple c++ program saved in hello_world.cpp file.
#include <iostream>
int main( void )
{
std::cout << "Hello world" << std::endl;
return( 0 );
}
When I try to compile it I get the following:
$ clang++ -Wall -o hello_world.o hello_world.cpp
hello_world.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
^~~~~~~~~~
1 error generated.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 22 (7 by maintainers)
I encountered this problem, when installing ucrt or other versions of GCC, it seems that clang cannot find the standard library.I try to install mingw-w64-clang-x86_64-gcc-compat and it solved.