我在wind7上使用Cygwin(2.2.1)来运行加载dll的python脚本,我尝试使用cdll form ctypes。但是我在运行脚本时遇到OSError:Exec格式错误,我不知道如何处理它。我也试过给出文件的路径,但问题似乎在其他地方。
>>> from ctypes import *
>>> cdll.LoadLibrary("DECO_CalInterface.dll")
Traceback (most recent call last):
File "DECOInitialization.py", line 18, in <module>
cdll.LoadLibrary("DECO_CalInterface.dll")
File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: Exec format error