Building python C++ extension modules using MS VC++ 2005?

B

Bo Peng

Dear list,

I have been using mingw to build a python extension module. I had to
jump through a number of hooks like the _ctype problem caused by the use
of msvcr71.dll, but the module was mostly usable.

Things become complicated when I use more and more boost libraries and
mingw can not work well with some of the modules. I am trying to switch
to VC but I was suggested that I need to use the identical version of VC
that is used to build python, which means VC7.1, 2003. However,
microsoft seems to stop distributing this version of VC, and its website
points me to VC expression 2005...

(http://msdn2.microsoft.com/en-us/visualc/aa336490.aspx)

Can I use the 2005 version to build python extension? What is the
official or recommended way to build python extension module under windows?

Many thank in advance.
Bo
 
S

Sandra-24

You can use 2005 to build extensions for Python 2.5. I've done this
with several extensions, both my own and others. I do not know if you
can use it for Python 2.4, so I won't advise you on that. I thought
Microsoft made its C/C++ compiler, version 7.1 (2003) freely available
as a command line tool. If you can't find it on their site, ask around,
I'm sure a lot of people have it. Probably you'll also find someone has
put it up somewhere if you search on google. Try 2005 first and see
what happens though.

-Sandra
 
B

Bo Peng

Sandra-24 said:
You can use 2005 to build extensions for Python 2.5. I've done this
with several extensions, both my own and others. I do not know if you
can use it for Python 2.4, so I won't advise you on that. I thought
Microsoft made its C/C++ compiler, version 7.1 (2003) freely available
as a command line tool. If you can't find it on their site, ask around,
I'm sure a lot of people have it. Probably you'll also find someone has
put it up somewhere if you search on google. Try 2005 first and see
what happens though.

But how exactly should I do it? I installed VC8 and get the all-familiar
error message: Python was built with Visual Stuidio 2003 ....

Actually, I get a copy of VC6/2003 but this compiler can not compile
boost 1.33.1/serialization so it can not be used to compile my extension
module.

Bo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top