作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试在 Windows 7 x64 上从 python27.dll
构建 64 位版本的 libpython27.a
。
按照这些 instructions ,我试过:
E:\temp>gendef python27.dll
* [python27.dll] Found PE+ image
E:\temp>dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpython27.a --i
nput-def python27.def
dlltool: Can't create .lib file: libpython27.a: Invalid bfd target
什么可以解释 dlltool: Can't create .lib file: libpython27.a: Invalid bfd target
?
dlltool 版本:
E:\temp>dlltool -V
GNU dlltool (GNU Binutils) 2.23.2
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
最佳答案
我正好遇到了这个问题。我的 MinGw 安装了 architecture = i686
。这是默认选择,我忘记在安装过程中更改它。
通过使用这些标志安装 MinGw 解决了这个问题:architecture = x86_64, threads = posix, exception = seh
。 MinGw\bin
的路径必须添加到 Windows 的 Path 环境变量中。
关于python - dlltool:无法创建 .lib 文件:libpython27.a:无效的 bfd 目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33686922/
我是一名优秀的程序员,十分优秀!