python无法打开文档_无法打开文件“python35_d.lib”

系统环境:Win10+VC2013+python35

问题描述:编译结果总是失败,跳错误提示是:fatal error LNK1104: 无法打开文件“python35.lib” 。

更换系统环境:Win10+VC2013+python27

问题描述:编译结果总是失败,跳错误提示是:fatal error LNK1104: 无法打开文件“python27.lib” ,问题依旧,故不是python版本问题。

错误的原因是系统安装有Python3.5,而默认的情况下Python是不提供python35.lib和python35_d.dll文件的。为了编译通过,需要在网上下载此二文件。通过软件everything搜索两者如下:

发现安装的软件如:Solidworks或者e2studio均包含以上文件,故将其拷贝到VC安装路径,Visual Studio12.0/VC/lib内,将下载的lib文件置于Visual Studio 12.0/VC/lib,dll文件置于Microsoft Visual Studio 12.0/VC/bin中,Release下编译通过。

Debug下,需要将 python35.lib文件复制并修改名字为python35_d.lib,具体参考如下说明。

If you build the example in debug mode, you will get an error: "cannot open file "python25_d.lib". To resolve this issue, make a copy of the existing python25.lib in your python installation "libs" folder and rename it to python25_d.lib and it will compile. You need to do this to build the debug version only. The release version will build without issues. Inspite of adding python25.lib in Additional Dependencies in the Debug configuration linker input setting, this error appears, and so I have found this workaround. It would be helpful if someone can throw some light on this issue.

本次练习的文档如下:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值