views:

58

answers:

1

I install wxWidgets with macports then ran the command: sudo cabal install wx which output included:

/bin/sh: wxdirect: command not found
/bin/sh: wxdirect: command not found
/bin/sh: wxdirect: command not found
/bin/sh: wxdirect: command not found
Configuring wxcore-0.12.1.6...
setup: Missing dependency on a foreign library:
* Missing C library: wx_macu-2.8
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
wx-0.12.1.6 depends on wxcore-0.12.1.6 which failed to install.
wxcore-0.12.1.6 failed during the configure step. The exception was:
ExitFailure 1

I got the same error when I used this command: sudo cabal install wx --extra-include-dirs=/opt/local --extra-lib-dirs=/opt/local. How can I install wx_macu-2.8, or do what I need to do to fix this problem?

+1  A: 

This is saying that you are missing a C library, not a Haskell library. Cabal can't install arbitrary C libraries.

Check the package manager for your distribution to make sure you have everything to do with wxWidgets-2.8, including any developer packages.

Paul Johnson
I knew I was missing a C library, if that was not clear. I just didn't know why I was missing it. I found that macports also has wxwidgets-devel, so I am installing that right know.
None
I installed wxwidgets-devel, and am using `sudo cabal install wx --extra-include-dirs=/opt/local --extra-lib-dirs=/opt/local` to install, and it seems to be working so far.
None
The install worked!
None