z3.dll错误 [英] Error with z3.dll
问题描述
我尝试将Z3 Prover用于C#中的大学项目,但是当我开始创建上下文对象时出现此错误:
I try to use Z3 Prover for a university project in C# but when I start to create a Context Object I get this Error:
System.DllNotFoundException: Die DLL "z3.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.
bei Microsoft.Z3.Native.LIB.Z3_del_context(IntPtr a0)
bei Microsoft.Z3.Context.Finalize()
bei Microsoft.Z3.Native.LIB.Z3_del_context(IntPtr a0)
bei Microsoft.Z3.Context.Finalize()
这里有人知道解决方案吗?
Is here anyone, who knows a solution?
谢谢!
推荐答案
要在.NET项目中使用Z3,您需要引用Microsoft.Z3.dll,该文件对libz3.dll具有(本机)依赖性。因此,两个DLL必须在运行时可访问。例如,通过将包含它们的目录放入PATH环境变量中。
To use Z3 in .NET projects you need to have a reference to Microsoft.Z3.dll, which has a (native) dependency on libz3.dll. So, both DLLs must be accessible at runtime; e.g., by putting the directory that contains them into your PATH environment variable.
此外,请确保提供了正确的版本,例如,对于32位程序使用32位DLL,否则您将收到根本无济于事的错误消息(例如,它将仅报告无法加载DLL)。
Also, make sure that the proper version is available, i.e., for 32-bit programs you have to use 32-bit DLLs, otherwise you will get error messages that don't help at all (e.g. it will simply report "can't load DLL").
这篇关于z3.dll错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!