473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

python and visual C++

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.

Jul 18 '05 #1
3 2411
Olivier Ravard wrote:
........ 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.

Googled mingw lib for python brings me to

http://www.mingw.org/MinGWiki/index....n%20extensions

which may help

--
Robin Becker

Jul 18 '05 #2
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
<ol************@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.


Jul 18 '05 #3

"Caleb Hattingh" <ca****@telkomsa.net> a écrit dans le message de news:
op**************@news.telkomsa.net...
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...


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
<ol************@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.

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
8
by: Will | last post by:
I just discovered Python and looked briefly at one of the tutorials for beginners... It looks a lot like the old Command line Basic... I'm sure it does much more but... 1 - Can you create...
2
by: Greg | last post by:
The following article from microsoft describes a workaroind for a bug in hte beta version of VISUAL PYTHON DOT NET ...
32
by: Mike Cox | last post by:
As you may or may not know, Microsoft is discontinuing Visual Basic in favor of VB.NET and that means I need to find a new easy programming language. I heard that Python is an interpreted language...
35
by: John Coleman | last post by:
Greetings, I have a rough classification of languages into 2 classes: Zen languages and tool languages. A tool language is a language that is, well, a *tool* for programming a computer. C is the...
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
7
by: sturlamolden | last post by:
On Windows, the standard Python 2.4 distro is compiled with Microsoft Visual C++ 2003 and is shipped with msvcr71.dll as a part of the binary installer. That is ok, as those who has a license for...
4
by: vedrandekovic | last post by:
Hi, I have already install Microsoft visual studio .NET 2003 and MinGw, when I try to build a extension: python my_extension_setup.py build ( or install ) , I get an error: LINK : fatal...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.