Error with z3.dll

纵然是瞬间 提交于 2019-12-10 12:09:07

问题


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?

Thankyou!


回答1:


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.

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").



来源:https://stackoverflow.com/questions/40842393/error-with-z3-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!