python and visual C++

Caleb Hattingh caleb1 at telkomsa.net
Wed Feb 2 22:20:57 EST 2005


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


On Wed, 2 Feb 2005 12:35:08 +0100, Olivier Ravard  
<olivier.ravard at novagrid.com> wrote:

> 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.
>
>
>




More information about the Python-list mailing list