[Haskell-beginners] ghci and module with FFI code

Nathan Hüsken nathan.huesken
Fri Oct 4 14:04:06 UTC 2013


Hey,

I wrote a little package which gives bindings to a C++ library (to the 
random forest from vigra).

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?

Thanks!
Nathan



More information about the Beginners mailing list