0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

保護者の制限でG++やcコンパイラーが使えないときの対処方法

Posted at
基本的に、Microsoft C++ Build Toolsは無理だと思う。なので、MinGWを使う。

MinGWのインストール方法

MinGW(Minimalist GNU for Windows)は、Windows上で動作するGCCコンパイラを含む開発環境です。以下の手順でインストールを行います。

1. MinGWのダウンロード

  1. MinGW公式サイト にアクセスする。
  2. 「Download」ボタンをクリックして、インストーラー(mingw-get-setup.exe)をダウンロードする。

2. インストール

  1. ダウンロードしたmingw-get-setup.exeを実行する。
  2. 「Install」ボタンをクリックし、インストールディレクトリを指定する(通常はC:\MinGW)。
  3. 「Continue」をクリックしてインストールを開始する。もし、そのディレクトリに権限がない場合は自身の使用する権限(C:\Users\ichig など)に変更してください。

3. 必要なパッケージのインストール

  1. インストーラーが起動したら、「Basic Setup」を選択。
  2. 以下のパッケージにチェックを入れる:
    • mingw-developer-toolkit
    • mingw32-base
    • mingw32-gcc-g++
    • mingw32-gcc-objc
  3. 右クリックして「Mark for Installation」を選択する。
  4. 左上の「Installation」→「Apply Changes」をクリック。
  5. 確認ダイアログが表示されたら「Apply」をクリックし、インストールを完了する。

4. 環境変数の設定

  1. 「Windowsキー + S」で「環境変数」と検索し、「環境変数の編集」を開く。
  2. 「システム環境変数」の「Path」を選択して「編集」をクリック。
  3. 「新規」をクリックし、MinGWのbinフォルダを追加する(例:C:\MinGW\bin インストール先+「\bin」になる)。
  4. 「OK」をクリックしてウィンドウを閉じる。

5. 動作確認

  1. コマンドプロンプトを開く(Win + Rcmd → Enter)。
  2. 以下のコマンドを実行する:
    gcc --version
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?