[Haskell-cafe] Gtk2Hs installation problem with ghc 6.8.2 on Ubuntu 7.10

Yin Wang yinyin.wang at gmail.com
Sun Dec 23 16:45:16 EST 2007


Hi,

I'm installing Gtk2Hs on my Ubuntu 7.10. I have ghc 6.8.2 compiled
with the extra libs in my home directory with the configuration
"./configure --prefix=/home/wy/Programs" and it worked well.

Then I configured gtk2hs in the same way and it compiled and installed
with no problem. But when I tried to compile the demo program with any
of the following command line:

# ghc --make World.hs
# ghc --make World.hs `pkg-config --cflags --libs gtk+-2.0`
# ghc --make World.hs `pkg-config --cflags --libs gtk+-2.0`
-L/home/wy/Programs/lib/gtk2hs

It give some linking errors:

Linking World ...
World.o: In function `r2JR_info':
(.text+0x46): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziAbstractziWidget_widgetShowAll_closure'
World.o: In function `r2JR_info':
(.text+0x4d): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziTypes_zdf550_closure'
World.o: In function `r2JT_info':
(.text+0xaa): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziAbstractziContainer_containerChild_closure'
World.o: In function `r2JT_info':
(.text+0xb1): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziTypes_zdf662_closure'
World.o: In function `r2JT_info':
(.text+0xb8): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziTypes_zdf550_closure'
...
collect2: ld returned 1 exit status

The first command worked well with the ghc 6.6.1 came with ubuntu. I
tried to uninstall my old gtk package, but this doesn't help. Any
ideas?


-- 
Yin Wang


More information about the Haskell-Cafe mailing list