
Hello, I would like to use Haskell with Gtk2Hs/Cairo for a project, but I have trouble making it work on Windows. I've installed the lastest GHC + Gtk2Hs and I tried to copy/paste the code from examples on this tutorial http://darcs.haskell.org/gtk2hs/docs/tutorial/Tutorial_Port/app1.xhtml. On linux; no problem. But for some reason I get a "not in scope: `eventSent`" error on Windows and I can't compile. How can I solve the problem and, more importantly, is it possible to write portable code with Gtk2Hs/Cairo ? Thank you

tutorial http://darcs.haskell.org/gtk2hs/docs/tutorial/Tutorial_Port/app1.xhtml. On linux; no problem. But for some reason I get a "not in scope: `eventSent`" error on Windows and I can't compile.
This tutorial is not updated to the last version of gtk2hs, or, better, it doesn't use the new names for widget events and doesn't handle then using EventM. ('onExpose', for instance, is deprecated in current gtk2hs.) I guess you installed the latest version in Windows, and that's why you have an error, since eventSent is something different in version 0.10. Your linux install is probably not the latest gtk2hs.
How can I solve the problem and, more importantly, is it possible to write portable code with Gtk2Hs/Cairo ?
Develop your applications in the latest version for all platforms. Try to install gtk2hs as user if you want, by downloading gtk2hs source code and using: ./configure --prefix=/home/mauricio --with-user-pkgconf I never had problems running the same application in linux and windows, but I can't say there's no specific functionality where problems can arrive. Cairo never gave me any problem. Best, Maurício
participants (2)
-
Maurício
-
Philippe D.-P.