开发者

Why am I getting a little-endian error when importing .so file in python

Im attempting to use a C++ extension for Python called PySndObj. and getting an error I have never seen and cannot find anyt开发者_高级运维hing about on the web :(

ImportError: /home/nhnifong/SndObj-2.6.6/python/_sndobj.so: ELF file data encoding not little-endian

I know that probably means the byte order is backwards, So I tried writing a little script that read the file 2 bytes at a time and switched their order before writing them back out. It didn't work.

Anyone know what to do?


You have to build the extension from source yourself.

It was valiant of you to try and "reverse the bytes", but only certain sections of the ELF file have word-oriented (as opposed to byte-oriented) data.

Furthermore, it's unlikely that the dll in question was compiled for your system's CPU architecture.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜