Windows での 7-Zip のインストール: 別ページ »で説明
【関連する外部ページ】
7-Zip の公式ページ: https://sevenzip.osdn.jp/
ここから先は,C:\llvm-mingw 下に展開(解凍)するとして説明を続ける.
7-Zip のインストールは 別ページ »で説明
cd <ダウンロードしたフォルダ名> 7z x llvm-mingw-20220906-msvcrt-x86_64.zip -oc:\
そのために,Windows で,コマンドプロンプトを管理者として実行
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\llvm-mingw-20220906-msvcrt-x86_64\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\llvm-mingw-20220906-msvcrt-x86_64\x86_64-w64-mingw32\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")" call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\llvm-mingw-20220906-msvcrt-x86_64\python\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
そのために,新しく Windows のコマンドプロンプトを開き、次のコマンドを実行する.
エラーメッセージが出なければOK.
where gcc where g++ where dlltool where clang where lldb
#include<stdio.h> int main() { printf("Hello,World!\n"); printf("sizeof(size_t)=%ld\n", sizeof(size_t)); return 0; }
Windows のコマンドプロンプトを開き、次を実行.
「Hello,World!」「sizeof(size_t)=8!」と表示されればOK.
gcc hello.c .\a.exe