编译OpenCV缺少python27_d.lib的解决方法
来源:互联网 发布:网络代理app软件 编辑:程序博客网 时间:2024/06/06 19:19
错误 24error LNK1104: 无法打开文件“python27_d.lib” C:\OpenCV\VS2013_64\modules\python\LINK opencv_python
一个妥协的方法是注释掉会使用python27_d.lib部分的代码,替换为使用python27.lib
具体做法如下:
在OpenCV项目的bindings中的opencv_python项目中,点击“外部依赖项”,在其中找到pyconfig.h和object.h文件:
在pyconfig.h中
将
#ifdef _DEBUG#define Py_DEBUG#endif修改为:
#ifdef _DEBUG//#define Py_DEBUG#endif将
/* For an MSVC DLL, we can nominate the .lib files used by extensions */#ifdef MS_COREDLL#ifndef Py_BUILD_CORE /* not building the core - must be an ext */#if defined(_MSC_VER)/* So MSVC users need not specify the .lib file intheir Makefile (other compilers are generallytaken care of by distutils.) */#ifdef _DEBUG#pragma comment(lib,"python27_d.lib")#else#pragma comment(lib,"python27.lib")#endif /* _DEBUG */#endif /* _MSC_VER */#endif /* Py_BUILD_CORE */#endif /* MS_COREDLL */修改为
/* For an MSVC DLL, we can nominate the .lib files used by extensions */#ifdef MS_COREDLL#ifndef Py_BUILD_CORE /* not building the core - must be an ext */#if defined(_MSC_VER)/* So MSVC users need not specify the .lib file intheir Makefile (other compilers are generallytaken care of by distutils.) */#ifdef _DEBUG#pragma comment(lib,"python27.lib")#else#pragma comment(lib,"python27.lib")#endif /* _DEBUG */#endif /* _MSC_VER */#endif /* Py_BUILD_CORE */#endif /* MS_COREDLL */在object.h中
将
/* Py_DEBUG implies Py_TRACE_REFS. */#if defined(Py_DEBUG) && !defined(Py_TRACE_REFS)#define Py_TRACE_REFS#endif修改为
/* Py_DEBUG implies Py_TRACE_REFS. */#if defined(Py_DEBUG) && !defined(Py_TRACE_REFS)//#define Py_TRACE_REFS#endif
阅读全文
0 0
- 编译OpenCV缺少python27_d.lib的解决方法
- 缺少Python27_d.lib的解决方法
- 缺少Python27_d.lib的解决方法
- 缺少Python27_d.lib的解决方法
- 缺少Python27_d.lib的解决方法
- protobuf 编译iOS,lib curl缺少行 x86_64的解决方法
- OpenCV缺少tbb_debug.dll的解决方法
- Latex编译后缺少包的解决方法
- cafffe编译中cannot open file 'python27_d.lib' 解决方案及原因讲解
- 编译opencv出错的解决方法
- 驱动学习(3)-编译缺少LIB
- vs2013编译osg缺少mfc120d.lib
- vs2013编译osg缺少mfc120d.lib
- vs2013编译osg缺少mfc120d.lib
- VS2010调用python编写的代码error:cannot open file 'python27_d.lib'".
- 缺少ddraw.lib的解决方案
- linux下编译C语言缺少库的解决方法
- qt编译后提示缺少xxx.dll的解决方法
- 系统定时任务
- 3. 数据结构进阶三静态查询之折半查询
- java学习第四天
- TCP/IP三次握手四次挥手
- Spring MVC 和 Spring 总结
- 编译OpenCV缺少python27_d.lib的解决方法
- 4. 数据结构进阶四静态查询之索引顺序查询
- LeetCode 516. Longest Palindromic Subsequence
- <C++>4.重载函数
- 区间dp
- 深度学习笔记: 稀疏自编码器
- 用@Resource注解来装配属性
- 2的幂次方表示
- 爬取需要登录的网站数据