I have problem with ghci+cairo on windows. When I try to load, for example like this "ghci -package cairo" it fails with the following error:
Loading package random-1.0.0.2 ... linking ... done. Loading package haskell98 ... linking ... done. Loading package syb-0.1.0.2 ... linking ... done. Loading package base-3.0.3.2 ... linking ... done. Loading package mtl-1.1.0.2 ... linking ... done. : C:\Users\alexeys\AppData\Roaming\cabal\cairo-0.12.0\ghc-6.12.3\HScairo-0.12.0.o: unknown symbol `_cairo_surface_destroy' Loading package cairo-0.12.0 ... linking ... : unable to load package `cairo-0.12.0'
Even simplest programs don't work in interactive mode, like for example 'Text.hs' that comes with cairo package. However compiled with 'ghc --make' everything works as expected, so its not a "missing dll" problem - everything is in place.
I used 'filemon' to look what "ghci" loads and in the log I can see 'libcairo-2.dll' (and this library has '_cairo_surface_destroy' symbol defined) being found and loaded successfully, so I don't really understand - what more does it wants?
stdcall
/ccall
mismatch. Does the symbol name in the DLL have a suffix like@4
? – Simon Marlow