Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know whether libpython27.a is 32-bit or 64-bit?

I have a libpython27.a file: how to know whether it is 32-bit or 64-bit, on Windows 7 x64?

like image 363
Franck Dernoncourt Avatar asked Mar 16 '26 08:03

Franck Dernoncourt


1 Answers

Try dumpbin /headers "libpython27.a". (dumpbin reference)

The output will contain

FILE HEADER VALUES 14C machine (x86)

or

FILE HEADER VALUES 8664 machine (x64)


Note that if you get an error message like:

E:\temp>dumpbin /headers "libpython27.a"
LINK: extra operand `libpython27.a'
Try `LINK --help' for more information.

It means there is a copy of the GNU link utility somewhere in the search path. Make sure you use the correct link.exe (e.g. the one provided in C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\bin). It also requires mspdb80.dll, which is in the same folder or something in PATH, otherwise you'll get the error message:

enter image description here

like image 54
cgohlke Avatar answered Mar 18 '26 22:03

cgohlke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!