GHCi 无法在 Windows 上加载.dll lib(C++ lib)
GHCi could not load .dll lib (C++ lib) on Windows
我已经通过vcpgk成功安装了一个C++库,命名为:lmdb:x64-windows
我还通过阴谋集团为 Haskell 安装了 lmdb 绑定包
尝试测试 lmdb 软件包时:
module Persistence where
import Database.LMDB.Raw
GHCi编译并加载了它:
[1 of 1] Compiling Persistence ( Persistence.hs, interpreted )
Ok, modules loaded: Persistence.
但是当我尝试调用 lmdb Raw lib 中的任何函数时它会抛出错误:
*Persistence> lmdb_version
ghc.exe: addDLL: lmdb.dll (Win32 error 126): The specified module could not
be found.
ghc.exe: Could not load `lmdb.dll'. Reason: addDLL: could not load DLL
ghc.exe: C:UsersthanhdoAppDataRoamingcabalx86_64-windows-ghc-
8.0.2lmdb-0.2.5-1uQhV16mebP51rtMgitOcYHSlmdb-0.2.5-
1uQhV16mebP51rtMgitOcY.o: unknown symbol `mdb_dbi_close'
ghc.exe: unable to load package `lmdb-0.2.5'
我正在四处搜索并尝试了几种方法,但仍然无法解决此错误。我使用的是Windows 7 64位,Haskell平台8.0.2。提前谢谢。
根据评论部分的讨论,我试图告诉 GHCi lmdb 的 dll 的位置。它在我修改 %路径% 环境后工作。在我的例子中,路径是:vcpkg\已安装\x64-windows\bin
相关文章:
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- 解析引用 |exe/dll vs lib
- CMake 生成的 MSVC 项目找不到符号,即使为其相关 dll 正确生成了 lib 文件也是如此
- 从 .lib 文件创建一个.dll文件
- 可执行文件C++包括.obj,.lib和.dll吗?
- 无法在 DLL 中链接 SDL2-static.lib
- 链接器找不到导入的 DLL 的 LIB 文件
- C++:重命名dll和lib并链接
- C++ CLR dll 需要 .lib 文件,但非 CLR 不需要
- 如何找出依赖于LIB文件的DLL列表?
- 链接 .lib 并在 Windows 中使用 .dll 在 C++ 在 Eclipse 中
- 将标头和 lib 转换为 dll 以将其与 c# 一起使用
- 为什么我的程序寻找共享资源.dll而不是Commons.lib
- 从.dll中调用.lib in C
- 如何在 go 中调用带有 .lib 和.dll文件的预构建 API
- 开发时C++ .lib,运行应用程序时.dll
- 尝试使用 .lib/.dll 时未解析的外部
- C# wrapper class for c++ lib dll
- 确定带有头文件的.lib / .dll