swig and init_module or initmodule, windows XP

Thomas Heller theller at python.net
Tue Jun 17 17:48:23 CEST 2003


[Please don't top-post. I've rearranged the following to compensate...]

"Thomas Jung" <jung-paz at t-online.de> writes:

> "Thomas Heller" <theller at python.net> schrieb im Newsbeitrag
> news:smq8kb99.fsf at python.net...

>> "Jung-Paz" <jung-paz at t-online.de> writes:
>>
>> > 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...
>>
>
> 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 ...
>
Can you post the setup script you use?

Thomas




More information about the Python-list mailing list