[Python-porting] How to solve the compatibility issue when import xxx.so

Lennart Regebro regebro at gmail.com
Mon May 19 14:21:31 CEST 2014


On Sun, May 18, 2014 at 3:14 AM, 北冰洋 <wtz_wh at foxmail.com> wrote:
> Hi guys,
>
> When I using Python2.7 to import xxx.so file which is compiled under
> Python2.4, There will be an error message
>      "ImportError: xxx.so: undefined symbol: Py_InitModule4"
>
> I know need use the xxx.so compiled by 2.7.2 here. But my concern is that
> how to keep backwad compatibility? Post one xxx.so for one version?

Yes. Generally you only need to do this for windows, as Unices tend to
include a compiler, so there the source code is enough.

//Lennart


More information about the Python-porting mailing list