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?

More than 3 years have passed since last update.

【小ネタ】Visual Studio CodeのターミナルからMSVCを使う

Posted at

目的

諸事情あって Visual Studio CodeでコーディングしてMSVCでコンパイルしたい。
そのため、Visual Studio Codeのターミナルからclnmakeコマンドを使用できるようにしたい。

方法

前提

  • Visual Studio Code がインストール済みであること
    • codeコマンドが有効であること
  • Visual Studio (のビルドツール)がインストール済みであること

手順

  1. 使用したいバージョンの「開発者コマンドプロンプト」または「Native Tools コマンドプロンプト」または「Cross Tools コマンドプロンプト」を起動する。
  2. codeコマンドにより Visual Studio Code を開く。
  3. 任意のフォルダやワークスペースを開く。

確認

  1. Visual Studio Code 上でターミナルを開く。
  2. clコマンドを引数無しで実行する。
  3. 以下のように目的のコンパイラのバージョン情報が表示されればOK。
>cl
Microsoft(R) C/C++ Optimizing Compiler Version 19.28.29915 for x64       
Copyright (C) Microsoft Corporation.  All rights reserved.

使い方: cl [ オプション... ] ファイル名... [ /link リンク オプション... ]

参考

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?