On Thu, Jan 21, 2010 at 3:49 PM, Barry Warsaw <ba...@python.org> wrote:
> Martin's follow up reminds me what the issues with C++ here are.  They center
> around which C++ compilers you use on which platforms.  Solaris, and to some
> extent Windows IIRC, were the most problematic for the work I was doing 3+
> years ago.  Usually, everything's fine if you're compiling all the code with
> the same compiler.  The problem comes if you want to mix say C++ libraries
> compiled with Sun's C++ compiler and Python compiled with g++.  Unlike the C
> world, where it doesn't matter much, once C++ is in the mix you have to be
> very careful about how all your libraries and core binary are compiled and
> linked.

I'm not an expert here, but this is why we've tried to avoid exposing
C++ functions into the public API. As long as the public API stays C,
we only require that LLVM and Python are compiled with the same
compiler, right? Extension modules, since they only call C API
functions, can be compiled with different compilers.

I could imagine a problem if Python+LLVM link in one libstdc++, and an
extension module links in a different one, even if no C++ objects are
passed across the boundary. Does that cause problems in practice? We'd
have the same problems as from having two different C runtimes in the
same application.

Jeffrey
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to