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 d开发者_高级运维o?
On Arch Linux, at least, clang installs into:
/usr/lib/llvm/libclang.a
/usr/lib/llvm/libclang.so
so the linker can find this library. You can also add paths to:
$ echo $LDFLAGS
-L/usr/local/lib -L/home/dons/lib
$ echo $LD_LIBRARY_PATH
/home/dons/lib
to help the linker out.
精彩评论