Windows下搭建TensorFlow环境5(CPU版本)

'Runtimelibrary' value‘MD_DynamicRelease’doesn’t match value‘MT_StaticRelease’

出错信息如下:

Windows下搭建TensorFlow环境5(CPU版本)

分析原因:工程属性内Runtime的MD与MT不匹配;

解决方法:

在工程目录内,找到protobuf.sln工程,并打开;

Windows下搭建TensorFlow环境5(CPU版本)

按照前面的方法,现将工程配置为Release x64平台:

Windows下搭建TensorFlow环境5(CPU版本)


选中几个工程,点鼠标右键——选“属性”:

Windows下搭建TensorFlow环境5(CPU版本)

弹出属性对话框,点击C/C++ ——“Code Generation”——“Runtime Library”——将MD修改为MT:

Windows下搭建TensorFlow环境5(CPU版本)

在Release模式下,编译:

Windows下搭建TensorFlow环境5(CPU版本)

在tensorflow工程上,只编译proto_text工程:

 Windows下搭建TensorFlow环境5(CPU版本)


cannot openinput file ‘\pywrap_tensorflow_internal.lib’

出错信息如下:

Windows下搭建TensorFlow环境5(CPU版本)

解决方法如下:

选中下面3个工程,点击鼠标右键——属性:

Windows下搭建TensorFlow环境5(CPU版本)

弹出属性页面,点击“Linker”—“Input”—“additional Dependencies”下拉列表,选择“Edit”:

Windows下搭建TensorFlow环境5(CPU版本)

在弹出对话框内,添加编译出错的lib库,如下:

Windows下搭建TensorFlow环境5(CPU版本)

再编译选中的3个工程:

Windows下搭建TensorFlow环境5(CPU版本)

Error MSB6006:‘cmd.exe’extied with code 1

出错信息如下:

Windows下搭建TensorFlow环境5(CPU版本)

解决方法如下:

 点击“计算机”——右键“属性”——选择“高级”——“环境变量”——在系统变量里找到Path,将Git路径添加到Path内:

Windows下搭建TensorFlow环境5(CPU版本)