python and visual C++

O

Olivier Ravard

Hi,

When I tryed to compile a python module using distutils under windows,
and there is an error message if we do not have Microsoft Visual C++ 6
installed.
This is because python have been compiled with MSVC6 and distutils wants it
in order to compile C++ python modules.

One of the reasons why I use python is because this is a free language. But
I need
a non free compilator to compile my C++ module !!! Choosing MSVC to compile
python is a strange choice since there are other free compilators like
MinGW.

I think that using another compilator should be possible in order to compile
python
modules since I use BOOST/MinGW to develop my own modules...

Diffrerent solutions appears :
- peoples who compile python for windows should use a free compilator
(MinGW or Microsoft Visual C++ Toolkit 2003 for example)
- modify distutils in order to use another compilator

Is there anyone that have experienced this "free" problem and is there a
solution
that I did not note. I don't want to buy MSVC...

Thanks

O.R.
 
C

Caleb Hattingh

Olivier

If you consider using the ctypes module, you can write a dll (windows) or
a shared object (linux) using anything that can make one of those.

For example, I have successfully used FreePascal to make a dynamic library
on both windows and linux and use that library within python on both
platforms.

Heck, even the objectpascal code for the dll was unchanged on both
platforms. I simply needed to recompile the objectpascal file on each
using FreePascal. Also FreePascal is available on many more platforms
(though not quite as many as python, I'll wager).

This is the only way I ever intend making native binary additions to my
own programs.

Regards
Caleb
 
O

Olivier Ravard

Caleb Hattingh said:
Olivier

If you consider using the ctypes module, you can write a dll (windows) or
a shared object (linux) using anything that can make one of those.

For example, I have successfully used FreePascal to make a dynamic library
on both windows and linux and use that library within python on both
platforms.

Yes. I do this too. I make my own modules with C++/BOOST and compile them
with gcc under Linux and Windows.

But the problem is about modules thats are developped from others with
distutils...
 
C

Caleb Hattingh

Olivier
But the problem is about modules thats are developped from others with
distutils...

Yes, sorry, I reread your original post and now realise that you were
referring to other people's modules. And with your comments there, I
agree with you -> MSVC as a requirement is unfortunate.

thx
Caleb
 

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
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top