簡體   English   中英

dlltool:無法創建.lib文件:libpython27.a:無效的bfd目標

[英]dlltool: Can't create .lib file: libpython27.a: Invalid bfd target

我試圖建立的64位版本libpython27.apython27.dll在Windows 7 64位系統。

按照這些說明 ,我試過:

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環境變量中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM