[Haskell-cafe] Mac and Gtk2hs problem

Tanja Piechnick tanja.piechnick at stud.uni-due.de
Thu Jun 7 13:50:37 CEST 2012


All right. 
After a re-installation I could load my GTK2HS example successfully. 
But I received another error. What is the meaning of that?

A wrong architecture? 

Prelude> :l guitest.hs 
[1 of 1] Compiling Main             ( guitest.hs, interpreted )
Ok, modules loaded: Main.
*Main> main
Loading package transformers-0.2.2.0 ... linking ... done.
Loading package mtl-2.0.1.0 ... linking ... done.
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package cairo-0.12.3.1 ... linking ... done.
Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl (dlopen(/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib, 9): no suitable image found.  Did find:
	/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib: mach-o, but wrong architecture)
*Main> 





This is the Content of guitest.hs

import Graphics.UI.Gtk
main :: IO ()
main = do
  initGUI
  window <- windowNew
  button <- buttonNew
  set window [ containerBorderWidth := 10,
               containerChild := button ]
  set button [ buttonLabel := "Hello World" ]
  onClicked button (putStrLn "Hello World")
  onDestroy window mainQuit
  widgetShowAll window
  mainGUI


Thank you for any help !


Am 07.06.2012 um 09:40 schrieb Ivan Lazar Miljenovic:

> On 7 June 2012 18:09, Tanja Piechnick <tanja.piechnick at stud.uni-due.de> wrote:
>> Thank you for your response.
>> 
>> If I execute "ghc-pkg list gtk" I receive this output:
>> 
>>> ghc-pkg list gtk
>> /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d
>> /Users/tanjapiechnick/.ghc/i386-darwin-7.0.4/package.conf.d
> 
> This means that you in fact _don't_ have the Haskell gtk package
> installed (in the sense that GHC knows about it), which is why you
> can't use it.
> 
>> 
>> But "ghc-pkg check" gives me no results
> 
> No, this in fact is good: it means that you don't have a problem with
> your Haskell libraries.
> 
>> 
>>  if you have only very recently built gtk etc via mac homebrew, you need to
>> build the head version of gtk2hs and family
>> 
>> 
>> Ok, and where can I get these informations?
> 
> I'm not too sure about this; Carter can hopefully tell you more about
> this (specifically which packages need to be built from HEAD, etc.).
> But you're going to want to use the darcs repository at
> http://code.haskell.org/gtk2hs/ .
> 
> -- 
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> http://IvanMiljenovic.wordpress.com
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120607/4dc06783/attachment.htm>


More information about the Haskell-Cafe mailing list