Compile protobuf with vs2013

vs2013 compiles protobuf test version 3.5.0
tool cmake: download address: https://cmake.org/download/ Generally, the win64-x64 version is selected, and the test version is cmake-3.11.1-win64-x64.msi

Download address: https://github.com/google/protobuf/releases

Generate the vs project of protobuf
Open Cmake (cmake-gui), select the cmake directory under the protobuf directory, and the directory where you want the vs project files to be stored;
source code directory E:/0dev/protobuf-3.5.0/cmake
build the binaries directory E :/0dev/protobuf-3.5.0/newvsproj
then click configure
and then select vs compile the corresponding version. I tested it with visual studio 12 2013, which is the default x86 compilation method.
If you choose x64, your project is also required to be compiled in x64 to load pb, otherwise it will not match (passed).
Finally, click Generate to generate the protobuf vs project in the set directory

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326447853&siteId=291194637