Haskell 包链接器错误:无法加载 .so/.DLL for:clang
我有一个问题,我想运行一个导入 libClang 的 haskell 脚本(import Clang
),我之前做了一个cabal install libClang
,
现在当我制作时 它可以工作runhaskell foo.hs
我得到:
foo.hs: <command line>: can't load .so/.DLL for: clang (libclang.so: cannot open shared object file: No such file or directory)
我知道我必须将库路径添加到 LD_LIBRARY_PATH
所以我添加了一些路径,因为我不知道我到底要使用哪个(我应该使用 clang/llvm 路径的 lib 路径还是 LibClang-9.0.0 所在的 .cabal 目录的 lib 路径?)
所以我得到:
echo $LD_LIBRARY_PATH
/home/foo/Downloads/clang+llvm-2.9-i686-linux/lib:/home/foo/.cabal/lib
再次运行 runhaskell 后,同样的问题仍然存在,我应该做什么做?
i guys i have a problem, i want to run a haskell script that imports libClang (import Clang
), i made a cabal install libClang
befor and it work
now when i make runhaskell foo.hs
i get:
foo.hs: <command line>: can't load .so/.DLL for: clang (libclang.so: cannot open shared object file: No such file or directory)
i know that i have to add the library path to LD_LIBRARY_PATH
so i add some paths to it because i dont know exactly which i have to use (should i use the lib path to the clang/llvm path or the lib path to the .cabal dir where my LibClang-9.0.0 is?)
so i got:
echo $LD_LIBRARY_PATH
/home/foo/Downloads/clang+llvm-2.9-i686-linux/lib:/home/foo/.cabal/lib
after running runhaskell again, the same problem still extists, what should i do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
至少在 Arch Linux 上,clang 安装到:
所以链接器可以找到这个库。您还可以添加路径到:
以帮助链接器。
On Arch Linux, at least, clang installs into:
so the linker can find this library. You can also add paths to:
to help the linker out.