python调用动态链接库的问题

Python/PHP/Perl 开发与设计
回复
crabhit
帖子: 6
注册时间: 2006-12-01 12:33
送出感谢: 0
接收感谢: 0

python调用动态链接库的问题

#1

帖子 crabhit » 2007-04-02 14:56

我是6.10
现在即使是之简单的动态链接库调用都不行,错误如下

代码: 全选

sang@sang-desktop:~/test$ ./test.py 
Traceback (most recent call last):
  File "./test.py", line 6, in ?
    functest = ctypes.cdll.func
  File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 390, in __getattr__
    dll = self._dlltype(name)
  File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 315, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: func: cannot open shared object file: No such file or directory
crabhit
帖子: 6
注册时间: 2006-12-01 12:33
送出感谢: 0
接收感谢: 0

Re: python调用动态链接库的问题

#2

帖子 crabhit » 2007-04-02 14:59

动态链接库本身经过C调用测试没有问题
crabhit 写了:我是6.10
现在即使是之简单的动态链接库调用都不行,错误如下

代码: 全选

sang@sang-desktop:~/test$ ./test.py 
Traceback (most recent call last):
  File "./test.py", line 6, in ?
    functest = ctypes.cdll.func
  File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 390, in __getattr__
    dll = self._dlltype(name)
  File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 315, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: func: cannot open shared object file: No such file or directory
回复

回到 “Python/Php/Perl”