By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,675 Members | 2,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,675 IT Pros & Developers. It's quick & easy.

compile pycrypto on windows

P: n/a
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py
creating build
creating build\lib.win32-2.3
creating build\lib.win32-2.3\Crypto
copying .\test.py -> build\lib.win32-2.3\Crypto
copying .\__init__.py -> build\lib.win32-2.3\Crypto
creating build\lib.win32-2.3\Crypto\Hash
copying .\Hash\HMAC.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\MD5.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\SHA.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\__init__.py -> build\lib.win32-2.3\Crypto\Hash
creating build\lib.win32-2.3\Crypto\Cipher
copying .\Cipher\__init__.py -> build\lib.win32-2.3\Crypto\Cipher
creating build\lib.win32-2.3\Crypto\Util
copying .\Util\number.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\randpool.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\RFC1751.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\test.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\__init__.py -> build\lib.win32-2.3\Crypto\Util
creating build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\AllOrNothing.py -> build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\Chaffing.py -> build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\__init__.py -> build\lib.win32-2.3\Crypto\Protocol
creating build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\DSA.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\ElGamal.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\pubkey.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\qNEW.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\RSA.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\__init__.py -> build\lib.win32-2.3\Crypto\PublicKey
running build_ext
building 'Crypto.Hash.MD2' extension
creating build\temp.win32-2.3
creating build\temp.win32-2.3\Release
creating build\temp.win32-2.3\Release\src
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -Ic:\Python23\include
-Ic:\Python23\PC -c src/MD2.c -o build\temp.win32-2.3\Release\src\md2.o
writing build\temp.win32-2.3\Release\src\MD2.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.3\Release\sr
\md2/o build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type'
---

can someone please help?

thanx
--
Haim
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Haim Ashkenazi <ha**@babysnakes.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py [snip] c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.3\Release\sr
\md2/o build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type'
---

can someone please help?
Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx
--
Haim


--
brainbot technologies ag
boppstrasse 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:ra**@brainbot.com
Jul 18 '05 #2

P: n/a
ra**@brainbot.com wrote:
Haim Ashkenazi <ha**@babysnakes.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try
to run the command 'python setup.py build -c mingw32 install' and I get
this error:

$ python setup.py build -c mingw32 install
running build
running build_py

[snip]
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s
build\temp.win32-2.3\Release\sr \md2/o
build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type' ---

can someone please help?


Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx, that solved it.

Bye
--
Haim
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.