compiling extensions on linux

Martin v. Löwis loewis at
Mon Sep 2 18:56:17 CEST 2002

Joe Connellan <joec at> writes:

> it does have a initmyextension declared - Here's a simple example of my
> problem - I've taken all c++ related stuff out so I can use gcc

However, you are still compiling it as a C++ program, since it has the
.cpp extension. You either need to rename the file (to .c), or use the
-x c command line option. If there was C++ stuff to take out, you best
declare the function as extern "C".


More information about the Python-list mailing list