[Haskell-cafe] foreign libraries, dylibs, OS X Mavericks and GHC 7.8.3 woes

Alfredo Di Napoli alfredo.dinapoli at gmail.com
Wed Oct 15 09:47:36 UTC 2014


Cheers Chris,
I have added your solution to the gist, for the future-me:

https://gist.github.com/adinapoli/d4c33a9d1ea85bcaebdf

A.

On Wednesday, 15 October 2014, Chris Wong <lambda.fairy at gmail.com> wrote:
>> You're installing into a cabal sandbox and compiling directly with ghc
(not
>> cabal), but ghc doesn't know anything about the sandbox. You need to
point
>> it to the package database with -package-db and tell it the package for
>> linking with -package [2].
>>
>> $ ghc -package-db .cabal-sandbox/x86_64-osx-ghc-7.8.3-packages.conf.d
>> -package snappy HelloSnappy.hs
>> Linking HelloSnappy ...
>> $ ./HelloSnappy
>> HelloSnappy: foo.jpg: openBinaryFile: does not exist (No such file or
>> directory)
>
> Alternatively, if you've got a recent version of cabal you can use
>
>     cabal exec -- ghc HelloSnappy.hs
>
> instead.
>
> You can also load up GHCi in the sandbox using `cabal exec ghci` or
> `cabal repl`.
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141015/89199f74/attachment.html>


More information about the Haskell-Cafe mailing list