subprocess.CalledProcessError: Command '['git', 'tag', '-l']' returned non-zero exit status 128

vs2017编译mongo-c-driver 时报这个错误

subprocess.CalledProcessError: Command '['git', 'tag', '-l']' returned non-zero exit status 128
CMake Error at CMakeLists.txt:10 (_message):
  BUILD_VERSION not specified and could not be calculated (script invocation
  failed); specify in CMake command, -DBUILD_VERSION=

 

此时需要指定版本

cmake -DBUILD_VERSION="1.15.1" -DCMAKE_INSTALL_PREFIX=D:\lib\mongo-c-driver\usr -DBSON_ROOT_DIR=D:\lib\mongo-c-driver\usr  -G "Visual Studio 15 2017" ..

 

重新cmake即可

 

 

 

你可能感兴趣的:(VC)