Extending Python with C++
"Martin v. Löwis"
martin at v.loewis.de
Thu Dec 29 20:39:36 CET 2005
> Oops, sorry. My question is, how can I know if my Python interpreter
> was lined by C++?
Ah. This documentation fragment is somewhat wrong: it depends on the
target operating system and compiler whether you have to link main
with a C++ compiler. For many modern systems, this isn't necessary.
Anyway, finding out whether the executable was linked with a C++
compiler is only possible with platform-dependent tools. For example,
on Linux and many Unix systems, ldd(1) will tell you whether a C++
library was linked into the binary; do 'ldd python'.
> The non-specific questions are, of course, does
> anyone have any hints or suggestions?
You should really understand the concept of 'extern "C"' in C++.
That's all you need to know write Python extensions in C++.
More information about the Python-list