[Python-Dev] Linux Python linking with G++?

"Martin v. Löwis" martin at v.loewis.de
Fri Jul 8 07:24:32 CEST 2005


David Abrahams wrote:
>>configure thinks that using CXX for linking is necessary if compiling
>>a program using CXX and linking it using CC fails.
> 
> 
> That might be the right thing to do for some programs, but AFAICT
> that's the wrong logic to use for Python.

Why do you say that? Python compiles Modules/ccpython.cc as the main
function, using the C++ compiler, and then tries to link it somehow.
On some systems (including some Linux installations), linking will
*fail* if linking is done using gcc (instead of g++). So we *must*
link using g++, or else it won't link at all.

Regards,
Martin


More information about the Python-Dev mailing list