如何使用Z3Py dll?

2024-04-16 15:02:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着使用Z3Py dll,但没用。这是我的测试程序和错误。我对Python很陌生,我想我错过了一些大家都知道的重要部分。你知道吗

init("z3.dll")

Traceback (most recent call last):
File "test5.py", line 1, in <module>
    init("z3.dll")

NameError:未定义名称“init”

enter image description here

enter image description here

我还尝试了另一种加载dll的方法:

import ctypes
so = ctypes.WinDLL('./z3.dll')     #for windows
print(so)
s = Solver()

<WinDLL './z3.dll', handle 10000000 at 0x10b15f0>
Traceback (most recent call last):
  File "test5.py", line 5, in <module>
    s = Solver()
NameError: name 'Solver' is not defined

enter image description here

enter image description here


Tags: imagemosthereinitdescriptioncallfilelast