0
我真的嘗試了很多。鏘不附帶標準C++包括,顯然無法找到他們:是否有可能在Windows上使用Clang編譯C++?
clang++ file.cpp -o file.out
C:\Folder\file.cpp:1:11: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
傳遞MinGW的包括由參數,返回另一個錯誤:
clang++ -target x86_64-w64-mingw32 C:\Folder\file.cpp -IC:\MinGW\mingw64\lib\gcc\x86_64-w64-mingw32\6.3.0\include\c++ -IC:\MinGW\mingw64\lib\gcc\x86_64-w64-mingw32\6.3.0\include\c++\x86_64-w64-mingw32 -IC:\MinGW\mingw64\x86_64-w64-mingw32\include -o C:\Folder\file.out -std=c++11
clang++.exe: error: unable to execute command: program not executable
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
當我使用-c
它不使用鏈接器也不會生成可執行文件。
編輯:我在Windows
你是從什麼執行的,你確定它可以使用DOS風格的路徑嗎? – Quentin
我使用哪些? –
按照指南在windows上安裝clang –