[Haskell-beginners] Re: Gtk2Hs and Cairo on Windows

Maurí­cio briqueabraque at yahoo.com
Fri Jun 26 22:40:56 EDT 2009


> 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



More information about the Beginners mailing list