473,666 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2425
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****@telkoms a.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
35524
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 and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
8
2286
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 windows, buttons, user input fields, etc as you can with Visual Basic? 2 - Can you call Windows Procedures or what ever they call them
2
1807
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 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui04032001.asp When did microsoft put python into the visual studio beta? How did this not make big news in developmnt circles? A.E.
32
8082
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 similar to VB. This means that it doesn't have all the hard stuff like pointers, classes and templates like C, C++ and assembly language. Where I work we use Microsoft Office with a lot of customization using Visual Basic. I would like to...
35
2366
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 prototypical tool language. Most languages in the Algol family are tool languages. Visual Basic and Java are also tool languages. On the other hand, a Zen language is a language which is purported to transform your way of thinking about...
48
4919
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 David Daniels where he said that probably the VS2003 toolkit will be used for Python 2.5 again. However, even before the release of Python 2.5, I cannot seem to find many retailers around here that still carry Visual Studio 2003, and some were a...
122
7335
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 outside of that class. This structured way allows visual tools to host components, and allows programmers to build applications and libraries visually in a RAD environment. The Java language has JavaBeans as its component model which allows Java...
7
2808
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 Microsoft Visual C++ 2003 is allowed to redistribute msvcr71.dll. Without a license for Microsoft Visual C++ 2003 one it not allowed to redistribute this DLL. This has some interesting implications: ** If you don't have Microsoft Visual C++...
4
2524
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 error LNK1141: failure during build of exports file error: command '"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe"' failed with exit status 1141.What shoud I
0
8454
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8362
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8560
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6200
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.