microsoft / caffe

Caffe on both Linux and Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pycaffe build link error,how to solve it ?

280185386 opened this issue · comments

1>------ 已启动生成: 项目: pycaffe, 配置: Debug x64 ------
1> PythonPreBuild.cmd : Create output directories for python scripts.
1> PythonPreBuild.cmd : Create dummy init.py file
1> PythonPreBuild.cmd : Generating src\caffe\proto\caffe.pb.h with python bindings
1> 正在创建库 F:\Disk_G\exercise_dl\caffe\caffe-ms\windows..\Build\x64\Debug_caffe.lib 和对象 F:\Disk_G\exercise_dl\caffe\caffe-ms\windows..\Build\x64\Debug_caffe.exp
1>_caffe.obj : error LNK2019: 无法解析的外部符号 _Py_NegativeRefcount,该符号在函数 _import_array 中被引用
1>_caffe.obj : error LNK2019: 无法解析的外部符号 _Py_Dealloc,该符号在函数 _import_array 中被引用
1>_caffe.obj : error LNK2001: 无法解析的外部符号 _Py_RefTotal
1>_caffe.obj : error LNK2001: 无法解析的外部符号 _Py_NoneStruct
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyInt_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyBool_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyFloat_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyString_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyTuple_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyCObject_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PySlice_Type
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyExc_AttributeError
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyExc_ImportError
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyExc_IndexError
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyExc_RuntimeError
1>_caffe.obj : error LNK2001: 无法解析的外部符号 PyExc_TypeError
1>F:\Disk_G\exercise_dl\caffe\caffe-ms\windows..\Build\x64\Debug_caffe.pyd : fatal error LNK1120: 16 个无法解析的外部命令

Do not know if you still need help now. I once had the same problem. The point is the version of your python, it must be 64-bit's python . My version is python-2.7.12.amd64.msi,and it's work. When I use python-2.7.12.msi which is 32-bit ,the problem you pull is happenning. I think It will help.