On 6 Jul, 18:00, "Alf P. Steinbach /Usenet" <alf.p.steinbach +use...@gmail.com> wrote:
> There is no *technical* problem creating a compiler-independent C/C++ language > binding. I believe that Java's JNI works fine no matter what compiler you use, > although it's many many years since I've done JNI things. Similarly, Python > should IMHO just have a well defined compiler independent native code > interface, > e.g. "PNI", or "pynacoin", the PYthon NAtive COde INterface :-) Yes but Python currently does not, due to dependency on VS2003 (2.5) or VS2008 (2.6, 2.7, 3.1) C and C++ runtime DLLs. It's not the binary interface that is the trouble, but CRT versioning. C++ is extra troublesome due to name mangling, standard runtime and exceptions. Here are the issues: C++: VS2010 - does not link with msvcp90.dll but msvcp100.dll. mingw - linkes statically with its own C++ library. Win32, ANSI C: VS2010 - does not link with msvcr90.dll but msvcr100.dll. mingw - ok for C if passed -lmsvcr90 on linking step Win64, ANSI C: VS2010 - does not link with msvcr90.dll but msvcr100.dll. mingw - missing import libraries (libmsvcr90.a and libpython26.a) Visual Studio 2008's C/C++ compiler is the only sane solution. It is still there so go get it if you don't already have a copy (I guess Alf does). -- http://mail.python.org/mailman/listinfo/python-list