
15 Oct
2014
15 Oct
'14
4:14 a.m.
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