我正在尝试在Windows 7 x64上从libpython27.a
构建一个64位版本的python27.dll
。
按照这些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
Assembler messages:
Fatal error: no compiled in support for x86_64
dlltool: as exited with status 1
dlltool: failed to open temporary head file: dgtnh.o: No such file or directory
什么可以解释Fatal error: no compiled in support for x86_64
?
我明白了:
E:\temp>dlltool -h
Usage dlltool <option(s)> <object-file(s)>
-m --machine <machine> Create as DLL for <machine>. [default: i386:x86-64]
possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, ppc, thumb
-e --output-exp <outname> Generate an export file.
问题是否来自possible <machine>
不包含x86_64
的事实,如果是,那么在何处找到支持dlltool.exe
的{{1}}?