找尋自己的一片天 schrieb: > I found it's quite strange when compiling. I didn't use extern "C" at all > , how can python get the right c++ funciton name without any compile error?? > > I found that it first use gcc to compile noddy3.cpp and then link by g++. > > Could anyone explain what it's all about?
The Python header files already contain the necessary extern "C" declarations. You can safely import the Python.h header file in a cpp file without an extern "C" block. Christian -- http://mail.python.org/mailman/listinfo/python-list