Creating a shared library does not work. See here: http://d.puremagic.com/issues/show_bug.cgi?id=1057 Trying arraytest with python2.4: martin@bazaar:~/compile/pyd/examples/arraytest$ python2.4 setup.py build [...] shim.mangleof: C3pyd12make_wrapper200__T12make_wrapperTC9arraytest3FooTS3pyd10class_wrap15__T4InitTPFiZvZ4InitTS3pyd10class_wrap42__T4ReprS30_D9arraytest3Foo8toStringMFZAaZ4ReprTS3pyd10class_wrap35__T3DefS24_D9arraytest3Foo3barMFZvZ3DefZ7wrapper class.def: bar /home/martin/compile/prefix_gdc/lib/python2.5/site-packages/celerid/infrastructure/pyd/op_wrap.d:112: Error: cannot implicitly convert expression (null) of type int(C *)(PyObject *) to long(C *)(PyObject *) error: command 'gdc' failed with exit status 1 Trying arraytest with python2.5 (build did work fine this time): martin@bazaar:~/compile/pyd/examples/arraytest$ python2.5 test.py Traceback (most recent call last): File "test.py", line 11, in from arraytest import Foo, get, set, test ImportError: /home/martin-gross/compile/pyd/examples/arraytest/build/lib.linux-x86_64-2.5/arraytest.so: undefined symbol: Py_InitModule4 On python2.5 64 bit it is called Py_InitModule4_64, see here: https://bugs.launchpad.net/ubuntu/+source/clearsilver/+bug/86685