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?

windowsでvcpkgコマンドを使用できるようにする

Posted at

概要

FreeTypeをインストールしようとした際に、以下のエラーが出力された。

vcpkg : 用語 'vcpkg' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前
として認識されません。名前が正しく記述されていることを確認し、パスが含まれている場合はそのパスが正し
いことを確認してから、再試行してください。

そのため、今回はvcpkgコマンドを使用できるようにすることを目指す。

環境

OS: Windows 11 Pro (24H2 , 26100.4946)
GCC: 13.1.0

インストール手順

自分はPowerShell派なので、以下は全てPowerShell上で実行する。

  1. PowerShellを管理者権限で実行する。
  2. Cドライブ直下にインストールするため、移動する。
    cd C:\
    
  3. gitからvcpkgをクローンする。
    git clone https://github.com/microsoft/vcpkg.git
    
  4. ブートストラップスクリプトを実行する。
    cd .\vcpkg
    .\bootstrap-vcpkg.bat
    
  5. 環境変数の設定
    設定を開き、システム->バージョン情報->システムの詳細設定->詳細設定->環境変数の順に進み、ユーザーの環境変数PathC:\vcpkgを追加する。
    なお、環境変数を変更した後は、Pathを反映させるためにPowerShellする必要がある。

結果

PS C:\Users\(USER NAME)> vcpkg install freetype
Computing installation plan...
A suitable version of cmake was not found (required v3.30.1).
Downloading https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-windows-i386.zip -> cmake-3.30.1-windows-i386.zip
Successfully downloaded cmake-3.30.1-windows-i386.zip
(後略)

無事に実行できた。

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?