[Pythonmac-SIG] Extending python in C++

Matthew Smith mps@viewbuild.com
Tue, 10 Dec 2002 13:26:06 +1100


Hello

Sorry that this is not mac related,

I'm trying to extend python with some C++ source, only I am having
difficulty exporting my init function. More specifically, when I try to
import my module (demo.so), I get the following error:
Loaded module does not contain symbol _initdemo

My source does contain the following function:

void initdemo()
{
    Py_InitModule("demo", demoMethods);
}

I'm assuming that this function either somehow needs to be exported, or is
being optimised out.

Any suggestions?

Matt Smith