swig and init_module or initmodule, windows XP

Thomas Jung jung-paz at t-online.de
Tue Jun 17 11:33:31 EDT 2003


Thank you ..

But: I could rename it once I have it - however, unless I change that
"init_example" to "initexample" by hand, it dies in the linking step with a
unresolved reference to initexample ...

Could that be some name mangling issue because of Python beeing build with
another compiler ?

I also just realized that I have the same problem using cygwin - swig
generates "init_example", the linker looks for "initexample" ....

"Thomas Heller" <theller at python.net> schrieb im Newsbeitrag
news:smq8kb99.fsf at python.net...
> "Jung-Paz" <jung-paz at t-online.de> writes:
>
> > Hi !
> >
> > I am new to Python and Swig ...
> >
> > I am using Python2.2, mingw and Swig 1.3.19, Windows XP, and trying to
build
> > a module using the distutils.
> > Basically it works, but in the final linking step I get an undefined
> > reference to "initexample" (the module name is example).
> > This sounds reasonable, as the file example_wrap.c, as produced by swig,
> > contains only a function "init_example.c".
> > If I replace "init_example" by hand with "initexample" and compile and
link
> > by hand, everything is fine, and I get a loadable and usable module.
> > Any idea how I could make swig to produce other function names, or
whatever
> > could help ?
>
> Sounds like you should name your extension _example.pyd instead of
> example.pyd...
>
> Thomas






More information about the Python-list mailing list