vcpkg를 사용한 Windows용 설치 예제

vcpkg를 사용하여 Windows에 Protobuf\gRPC 패키지를 설치할 수 있습니다.

참고: 대체 솔루션으로 Protobuf\gRPC 패키지를 수동으로 빌드할 수 있습니다. 빌드 지침은 각각 ProtobufgRPC에 대해 찾을 수 있습니다.

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을 실행합니다. 이 예제에서는 애플리케이션의 서버 부분에 네이티브 C++ 소스 코드 생성기 플러그인 Magic 8 Ball 을 사용하므로 두 패키지를 모두 설치해야 합니다. Magic 8 Ball 예제를 시작하려면 다음 단계가 필요합니다:

  • Examples 섹션에서 Magic 8 Ball을 찾습니다:

  • Qt Creator 구성 설정에서 MSVC 기반 빌드 키트를 선택합니다:

  • 설치된 Protobuf\gRPC 패키지의 경로를 Initial Configuration 설정 블록 내의 CMAKE_PREFIX_PATH 환경 변수에 추가합니다:

  • 빌드 및 실행을 클릭합니다.

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