vs2013编译protobuf

vs2013编译protobuf 测试版本 3.5.0
工具cmake:下载地址:https://cmake.org/download/ 一般都是选的win64-x64版本,测试版本是cmake-3.11.1-win64-x64.msi

下载地址: https://github.com/google/protobuf/releases

生成protobuf的vs工程
打开Cmake(cmake-gui),分别选择protobuf目录下的cmake目录,以及希望vs工程文件存放目录;
source code 目录 E:/0dev/protobuf-3.5.0/cmake
build the binaries 目录 E:/0dev/protobuf-3.5.0/newvsproj
然后点击configure
然后选择vs编译对应版本。我测试的是 visual Studio 12 2013 这个是默认是x86的编译方式。
如果选x64的就要求你的工程也是x64编译方式加载pb,否则会不匹配(中过)。
最后点击Generate,即可在所设置的目录下生成了protobuf的vs工程

猜你喜欢

转载自www.cnblogs.com/xiao0913/p/9016055.html