[Python-Dev] Why is python linked with c++?

"Martin v. L÷wis" martin@v.loewis.de
Sun, 13 Jul 2003 19:05:51 +0200

Barry Scott wrote:

> Is linking with c++ the trick that allows C++ extensions to be 
> dynamically loaded into python?

It should be, yes. It all depends on the compiler: some compilers 
require that the executable is linked with the C++ compiler, some 
compilers require that main is compiled with the C++ compiler, some 
compilers allow to load C++ extensions even if only the C compiler was 
used when building Python, some compilers don't support C++ at all, and 
so on. configure is supposed to figure it all out.

If there is a specific platform/compiler/phase-of-the-moon combination 
that is not working, but which could be made working by using different 
magic incantations, please submit a bug report.