On Jun 11,2010, at 2:40 AM, Axel Simon wrote:
Hi Brett,
On 11.06.2010, at 04:53, Brett Giles wrote:
Hi Folks
I seem to have Gtk2HS 0.11 installed, but not quite working. Interestingly, I can run a demo, such as the hello/World.hs example, directly in ghci. However, when I try to do a ghc --make on any code containing gtk2hs I get a link error like this:
Undefined symbols:
"_iconv_close", referenced from:
_hs_iconv_close in libHSbase-4.2.0.0.a(iconv.o)
(maybe you meant: _hs_iconv_close)
"_iconv", referenced from:
_hs_iconv in libHSbase-4.2.0.0.a(iconv.o)
(maybe you meant: _hs_iconv_open, _hs_iconv , _hs_iconv_close )
"_iconv_open", referenced from:
_hs_iconv_open in libHSbase-4.2.0.0.a(iconv.o)
(maybe you meant: _hs_iconv_open)
ld: symbol(s) not found
I do have libiconv installed as a universal library via macports. gtk, glade etc., are also universal installed via macports.
I downloaded the OSX Haskell Platform package and am running ghc 6.12.1
The iconv issue is usually that you also have a libiconv that Apple ships. The platform ghc probably links against that while macports (and thus Gtk+) uses its own. I have no idea who's to blame here but I guess you should be trying to change your LD_LIBRARY_PATH or your DYLD_LIBRARY_PATH to /opt/sw since that contains the more complete version.
Cheers,
Axel