473,327 Members | 2,007 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,327 software developers and data experts.

Compiling C++ extensions with distutils on Cygwin

I'm trying to build a C++ extension on Cygwin, but it fails because
distutils invokes gcc instead of g++. Looking into distutils internals,
it turns out that compilation is assumed to be independent of the
target language, while linking is not (CCompiler.compile() doesn't take
a target_lang argument but CCompiler.link() does). Is there a good
reason for this ?

George

Jul 19 '05 #1
2 1612
On 21 Jun 2005 17:28:06 -0700, George Sakkis <gs*****@rutgers.edu> wrote:
I'm trying to build a C++ extension on Cygwin, but it fails because
distutils invokes gcc instead of g++. Looking into distutils internals,
it turns out that compilation is assumed to be independent of the
target language, while linking is not (CCompiler.compile() doesn't take
a target_lang argument but CCompiler.link() does). Is there a good
reason for this ?


No idea, but I think the people who did module pcapy has a workaround in
their setup.py. No idea if the workaround is good or not (but it happens to
work for me).

http://oss.coresecurity.com/projects/pcapy.html

/Jorgen

--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
Jul 19 '05 #2
"George Sakkis" wrote:
I'm trying to build a C++ extension on Cygwin, but it fails because
distutils invokes gcc instead of g++. Looking into distutils internals,
it turns out that compilation is assumed to be independent of the
target language, while linking is not (CCompiler.compile() doesn't take
a target_lang argument but CCompiler.link() does). Is there a good
reason for this ?


Is this a coincidence or what ? A patch for exactly this issue was
posted just five days ago (http://python.org/sf/1222585), so it should
be fixed in 2.5.

George

Jul 19 '05 #3

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

Similar topics

0
by: Andrew Gregory | last post by:
In Python 2.2, I compiled some C++ code on Windows (MinGW compiler) to create an extension using distutils and the following setup.py file: from distutils.core import setup, Extension setup...
6
by: Chris Gonnerman | last post by:
I'll be quick. Here's a transcript: C:\usr\WConio-1.5>python setup.py build --compiler=mingw32 running build running build_py running build_ext building '_WConio' extension writing...
0
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are...
3
by: Mike C. Fletcher | last post by:
Every few months I get to working on a Python C extension (built with distutils) and discover a pointer error or the like where I'd like to be able to step into my DLL and see where the extension...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
7
by: Scott | last post by:
I've installed Python 2.4 under WinXP and am attempting to create an extension module using the steps outlined here: http://python.org/doc/2.4/ext/win-cookbook.html I'm specifically trying to...
6
by: Christian Heimes | last post by:
inhahe schrieb: I assume you are trying to compile Python 2.5 with VS 9.0. It's not supported. Some extensions don't compile under VS 9.0 Christian
0
by: newbie73 | last post by:
OS: Vista Python 2.5.2.2 (ActiveState Software Installation) Running latest Cygwin release The error generated is pasted below - please help. - Luis ***************************************
2
by: eliben | last post by:
On Jun 27, 3:10 pm, eliben <eli...@gmail.comwrote: Problem solved: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.