I'm running into some really weird problems with ctypes.  I'm using ctypes to interface to a C++ library that has a C interface.  The library has lots of parallel functionality.  More often than not, the parallel calls tend to end up with a segfault from the C++ layer, but I've run into them with some serial code too.  I'm wondering if there is any restriction on whether the Python interpreter and the C++ code need to be compiled with the same version of the C++ compiler?  If so, how do I find out what c++ was used to build Python?  I've tried to run strings on Python and grep for gcc and g++, nothing shows up.
CPython doesn't contain C++ code and thus there is no requirement with regards to the C++ compiler used to compile a C++ library loaded into a CPython process.  However, the C layer and the C++ library must generally be compiled with the same C++ compiler.  And if the C++ library or the C layer link against libpython, they must be compiled against the same version of CPython that is later used to run the ctypes code that loads the library.
ctypes - does python need to be compiled with same version as C library?