SWIG Python undefined reference

Soren soren.skou.nielsen at gmail.com
Tue Apr 29 06:45:27 EDT 2008


On Apr 29, 11:31 am, Soren <soren.skou.niel... at gmail.com> wrote:
> Ok I found out how to do it using:
>
> gcc -Ic:\python24\include -Lc:\python24\libs --shared example_wrap.c
> example.c -lpython24 -o _example.pyd
>
> but now I get a "dynamic module does not define init function" error
> when I try to import it into python..
>
> Anyone??
>
> Soren

In case anyone is having the same problem the solution for me was:

gcc example.c example_wrap.c -Ic:\python24\include -Lc:\python24\libs -
lpython24 -Xlinker -expoert-dynamic -shared -o _example.pyd

Soren



More information about the Python-list mailing list