最近使用tiny-dnn模型,需要安裝protobuf;
1.通過github下載下傳protobuf https://github.com/google/protobuf.git;并解壓,并在同級目錄下建立檔案夾install;
2.下載下傳gmock,我下的是gmock-1.7.0.zip
3.在D:\protobuf\protobuf-master\cmake下建立build檔案夾,然後在其下建立solution檔案夾;
4.然後在solution下,使用camke (docs下):
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=../../../../install ../..
然後會生成protobuf.sln解決方案
5.生成解決方案
6.編譯install,會在上面的install檔案中生成bin,include,lib檔案
結束。