環境:windows7,64位windows
一、下載並安裝llvm,安裝包裏除了llvm,也有clang:架構
http://releases.llvm.org/5.0.0/LLVM-5.0.0-win64.exespa
二、下載並安裝mingw:.net
https://sourceforge.net/projects/mingw-w64/命令行
安裝時選擇CPU架構爲 x86_64get
把安裝路徑添加到path中:編譯
C:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev2\mingw64\bin下載
三、打開命令行窗口,開始編譯程序:程序
clang --target=x86_64-pc-mingw64 hello.c -o hello.execo