On Fri, Oct 4, 2013 at 10:04 AM, Nathan Hüsken <nathan.huesken@posteo.de> wrote:
Works fine! But when I try to load a module using it in ghci, and run an function (which is unrelated to the FFI bindings) I get:

/lib/hsVigraRF-0.1.0.0/ghc-7.6.2/HShsVigraRF-0.1.0.0.o: unknown symbol `_ZGVZN5vigra10rf_defaultEvE6result'

_ZGVZN5vigra10rf_defaultEvE6result is a symbol from vigra.
So why do I get this in ghci and not when compiling/running? What can I do about this?

Becaue ghci's symbol resolution is an ugly hack in released versions of ghc. The next ghc release redoes ghci to use the system linker instead of a built-in hack, and fixes many of these issues; you can wait for its release or build ghc HEAD.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net