You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compile the project of pycaffe , I found errors on the output window:
15>_caffe.obj : error LNK2019: __imp__Py_NegativeRefcount
15>_caffe.obj : error LNK2019: __imp__Py_Dealloc
15>_caffe.obj : error LNK2001: __imp__Py_RefTotal
15>..\Build\x64\Debug_caffe.pyd : fatal error LNK1120:
These may be cause by the python config problem on windows, the solution is below:
Firstly, comment the define Py_DEBUG on pyconfig.h:
line 379 #ifdef _DEBUG
line 380 //# define Py_DEBUG
line 381 #endif
Change
line 338 # pragma comment(lib,"python27_d.lib")
into
line 338 # pragma comment(lib,"python27.lib")
Then, commment the line 56 on object.h
line 55 #if defined(Py_DEBUG) && !defined(Py_TRACE_REFS)
line 56 //#define Py_TRACE_REFS
line 57 #endif
pyconfig.h & object.h can be find at your $PythonHome/include directory
for Miniconda 2, it's C:\Miniconda2\include
Good luck, :)
The text was updated successfully, but these errors were encountered:
When compile the project of pycaffe , I found errors on the output window:
15>_caffe.obj : error LNK2019: __imp__Py_NegativeRefcount
15>_caffe.obj : error LNK2019: __imp__Py_Dealloc
15>_caffe.obj : error LNK2001: __imp__Py_RefTotal
15>..\Build\x64\Debug_caffe.pyd : fatal error LNK1120:
These may be cause by the python config problem on windows, the solution is below:
Firstly, comment the define Py_DEBUG on pyconfig.h:
line 379 #ifdef _DEBUG
line 380 //# define Py_DEBUG
line 381 #endif
Change
line 338 # pragma comment(lib,"python27_d.lib")
into
line 338 # pragma comment(lib,"python27.lib")
Then, commment the line 56 on object.h
line 55 #if defined(Py_DEBUG) && !defined(Py_TRACE_REFS)
line 56 //#define Py_TRACE_REFS
line 57 #endif
pyconfig.h & object.h can be find at your $PythonHome/include directory
for Miniconda 2, it's C:\Miniconda2\include
Good luck, :)
The text was updated successfully, but these errors were encountered: