vcpkgを使用したWindowsへのインストール例
Protobufと gRPC™パッケージをインストールできます。
Windowsインストールの前提条件
vcpkg は、クロスプラットフォーム C/C++ パッケージマネージャです。Protobuf、gRPC 、およびその依存関係のインストールには、vcpkg を使用できます:
.\vcpkg.exe install protobuf protobuf:x64-windows .\vcpkg.exe install grpc:x64-windows
注: マニフェストモードの使用をお勧めします。このモードでは、宣言的なJSONファイルを使用して、プロジェクトに関するメタデータを記述します。マニフェストファイルにはvcpkg.jsonという名前が必要です。
最後に、Protobuf とgRPC のサポートにより、Qt ベースのプロジェクトをビルドして実行できます。例えば、インストールしたバージョンのQtからMagic 8 Ballを実行します。この例では、両方のパッケージがインストールされている必要があります。Magic 8 Ball は、アプリケーションのサーバー部分にネイティブ C++ ソースコード生成プラグインを使用しているからです。Magic 8 Ball のサンプルを開始するには、以下の手順が必要です:
ExamplesセクションでMagic 8 Ball を見つける:
- Qt Creator の設定から MSVC ベースのビルドキットを選択します:

Initial Configuration設定ブロック内のCMAKE_PREFIX_PATH環境変数に、インストールされた Protobuf およびgRPC パッケージへのパスを追加します:
- ビルドと実行。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.