[Python-Dev] CVS: python/dist/src README,1.106,1.107

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Wed, 13 Dec 2000 22:56:27 +0100


> Another question remains regarding the docs though: why is it bad to
> always compile main.c with a C++ compiler?

For the whole thing to work, it may also be necessary to link the
entire application with a C++ compiler; that in turn may bind to the
C++ library. Linking with the system's C++ library means that the
Python executable cannot be as easily exchanged between installations
of the operating system - you'd also need to have the right version of
the C++ library to run it. If the C++ library is static, that may also
increase the size of the executable.

I can't really point to a specific problem that would occur on a
specific system I use if main() was compiled with a C++
compiler. However, on the systems I use (Windows, Solaris, Linux), you
can build C++ extension modules even if Python was not compiled as a
C++ application.

On Solaris and Windows, you'd also have to chose the C++ compiler you
want to use (MSVC++, SunPro CC, or g++); in turn, different C++
runtime systems would be linked into the application.

Regards,
Martin