compiling extensions on linux

Martin v. Löwis loewis at informatik.hu-berlin.de
Mon Sep 2 18:56:17 CEST 2002


Joe Connellan <joec at mill.co.uk> 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".

Regards,
Martin



More information about the Python-list mailing list