By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

Compiling C++ extensions with distutils on Cygwin

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.