[Haskell-cafe] Linking errors when compiling projects with the ncurses-0.2 library

Max Bolingbroke batterseapower at hotmail.com
Sun Mar 6 11:43:10 CET 2011


Hi Roman,

2011/3/5 Román González <romanandreg at gmail.com>:
> ld: warning: in /Users/roman/.homebrew/lib/libncursesw.dylib, file was built
> for unsupported file format which is not the architecture being linked
> (i386)

This is the problem. You are using OS X 10.6 and Homebrew is building
a 64 bit ncurses. However, GHC generates 32 bit code that expects to
link against a 32 bit ncurses.

In MacPorts, you would solve this by reinstall ncurses with the flag
+universal that instructs MacPorts to build a universal binary
containing both 32 and 64 bit versions of ncurses. I'm not sure what
the equivalent would be for homebrew.

Cheers,
Max



More information about the Haskell-Cafe mailing list