"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >>>configure thinks that using CXX for linking is necessary if compiling >>>a program using CXX and linking it using CC fails. >> >> >> That might be the right thing to do for some programs, but AFAICT >> that's the wrong logic to use for Python. > > Why do you say that? Python compiles Modules/ccpython.cc as the main > function, using the C++ compiler, and then tries to link it somehow. > On some systems (including some Linux installations), linking will > *fail* if linking is done using gcc (instead of g++). So we *must* > link using g++, or else it won't link at all.
This is starting to feel tautological, or self-referential, or something. If by ccpython.cc you mean http://cvs.sourceforge.net/viewcvs.py/*checkout*/python/python/dist/src/Modules/ccpython.cc well of *course* linking will fail. You have to compile that file as C++ program since it uses extern "C" which is only legal in C++ . But AFAICT, in a normal build of the Python executable, there's no reason at all for main to be a C++ function in the first place. Unless, of course, I'm missing something. So if I am missing something, what is it? -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ 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