Example of installation for Windows using vcpkg

You can install Protobuf and gRPC packages on Windows using vcpkg.

Note: As an alternative solution, you can build Protobuf and gRPC packages manually. Build instructions can be found for Protobuf and gRPC respectively.

Windows installation prerequisites:

The vcpkg is a cross-platform C/C++ package manager. You can use the vcpkg for Protobuf, gRPC and its dependencies installation:

.\vcpkg.exe install protobuf protobuf:x64-windows
.\vcpkg.exe install grpc:x64-windows

Finally, you can build and execute Qt-based projects with Protobuf and gRPC support. For instance, run Magic 8 Ball from your installed version of Qt. The example requires both packages to be installed, since Magic 8 Ball uses native C++ source code generator plugin for the server part of application. Following steps are required to start Magic 8 Ball example:

  • Find Magic 8 Ball in Examples section:

  • Choose MSVC-based building kit from Qt-creator configuration settings:

  • Add the paths to the installed Protobuf and gRPC packages to the CMAKE_PREFIX_PATH environment variable inside Initial Configuration settings block:

  • Build and Run.

© 2024 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.