下载
protobuf 3.5.1: https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-all-3.5.1.zip
cmake: https://cmake.org 我用的是 https://cmake.org/files/v3.11/cmake-3.11.0-rc2-win64-x64.msi
编译
使用 VS2015开发人员命令提示 进入 protobuf 的 cmake 目录
执行命令:
mkdir release & cd release cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../../install ../.. nmake nmake install ----- mkdir debug & cd debug cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../../../install ../.. nmake nmake install
原文地址:https://www.cnblogs.com/Y4ng/p/vs2015_build_google_protobuf_351.html
时间: 2024-11-18 01:59:39