Cloth가 창에서 작업하도록하려면이 자습서 (here)를 따르십시오. msys2와 함께 clang을 설치할 경로를 선택합니다. 그 소리 ++ Helloworld.cpp -o되는 Helloworld.exe가 -std = C++Windows에서 Msys2 및 Clang : iostream 파일을 찾을 수 없음
(14) 내가 오류 : 컴파일 후
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello, World!\n";
return 0;
}
:
모든 지침을 따른 후 나는 간단한 프로그램을 작성 :
*Helloworld.cpp:2:10: fatal error: 'iostream' file not found,
1 error generated.*
명령 줄에 -v를 추가 내가 얻을 :
clang version 3.9.1 (tags/RELEASE_391/final)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:\msys64\mingw64\bin
"C:\\msys64\\mingw64\\bin\\clang++.exe" -cc1 -triple x86_64-w64-windows-gnu -emit-obj -mrelax-all -disable-free -disable- llvm-verifier -discard-value-names -main-file-name Helloworld.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -debugger-tuning=gdb -resource-dir "C:\\msys64\\mingw64\\bin\\..\\lib\\clang\\3.9.1" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\x86_64-w64-mingw32" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\backward" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\\\x86_64-w64-mingw32" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\\\backward" -internal-isystem "C:\\msys64\\mingw64\\include\\c++\\" -internal-isystem "C:\\msys64\\mingw64\\include\\c++\\\\x86_64-w64-mingw32" -internal-isystem "C:\\msys64\\mingw64\\include\\c++\\\\backward" -internal-isystem "include\\c++" -internal-isystem "include\\c++\\x86_64-w64-mingw32" -internal-isystem "include\\c++\\backward" -internal-isystem "C:\\msys64\\mingw64\\bin\\..\\lib\\clang\\3.9.1\\include" -internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include" -internal-isystem "C:\\msys64\\mingw64\\include" -std=c++14 -fdeprecated-macro -fdebug-compilation-dir "C:\\msys64\\programming" -ferror-limit 19 -fmessage-length 0 -femulated-tls -fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o "C:\\msys64\\tmp\\Helloworld-2393e7.o" -x c++ Helloworld.cpp
clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64-w64-windows-gnu
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\x86_64-w64-mingw32"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\backward"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\\x86_64-w64-mingw32"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\\backward"
ignoring nonexistent directory "C:\msys64\mingw64\include\c++\"
ignoring nonexistent directory "C:\msys64\mingw64\include\c++\\x86_64-w64-mingw32"
ignoring nonexistent directory "C:\msys64\mingw64\include\c++\\backward"
ignoring nonexistent directory "include\c++"
ignoring nonexistent directory "include\c++\x86_64-w64-mingw32"
ignoring nonexistent directory "include\c++\backward"
ignoring nonexistent directory "C:\msys64\mingw64\x86_64-w64-mingw32\include"
#include "..." search starts here:
#include <...> search starts here:
C:\msys64\mingw64\bin\..\lib\clang\3.9.1\include
C:\msys64\mingw64\include
End of search list.
Helloworld.cpp:2:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
어떻게 iostream을 찾기 위해 시스템을 어떻게해야합니까? 나는 당신이 clang/lib/Frontend/InitHeaderSearch.cpp에있는 mingw 헤더를 가리켜 야한다는 것을 알았습니다. 내 컴퓨터에서 InitHeaderSearch.cpp 파일을 찾을 수 없습니다.
는 당신의 도움을 주셔서 감사합니다.윈도우 8 연타 3.9.1
오류는 이미지가 아닌 코드 블록에 게시해야합니다. 이렇게하면 읽기가 쉬워지고 검색 엔진이 질문의 색인을 생성 할 수 있습니다. – nloewen