5

gcc を使用してソースからビルドされた MinGW/MSYS と wxWidget 3.0 を使用して、Windows XP64 を実行しているマシンに wxHaskell をインストールしようとしていました。やった:

cabal install wx

エラーが発生しました:

...
Configuring wxc-0.90.0.4...
setup.exe: wx-config: does not exist
Failed to install wxc-0.90.0.4
cabal.exe: Error: some packages failed to install:
wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install.
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.

wxWidgets を使用して C++ (gcc) でサンプル アプリケーションを作成することに成功しました。だから私はwxWidgetのインストールが機能しています。そして私は持ってwx-configいます:

$ which wx-config
/usr/local/bin/wx-config

問題はwx-config、UNIX シェル スクリプトであり、cabal (MSYS から呼び出される) が、システム パス上にある場合でも認識を拒否することです。MSYS で実行するwx-configと、次のようになります。

$ wx-config --cxxflags
-I/usr/local/lib/wx/include/msw-unicode-3.0 -I/usr/local/include/wx-3.0 -D_LARGE
FILE_SOURCE=unknown -DWXUSINGDLL -D__WXMSW__ -mthreads

スクリプトをexeに変換できるかどうかを確認するためにhttps://stackoverflow.com/questions/21998763/how-to-convert-msys-shell-scripts-to-windows-exe-filesに質問しましたが、誰も解決策を答えませんでした。

ここにも関連する質問wxHaskell installation on windowsがあり、別の here wx 0.90.0.1 fails to install on Haskell Platform 2012.2.0.0 (WinXP) があります。実際、動作確認済みの回答は見つかりませんでした。また、ここでのエラー/設定が異なるように見えるか、その回答が私の問題を解決していないようです。特に、 http: //www.haskell.org/haskellwiki/WxHaskell/Windowsごとにhttps://sourceforge.net/projects/wxhaskell/files/wx-config-win/から外部 wx-config.exe をダウンロードしました。しかし、wx-config.exe を実行すると、wxWidget のインストールを認識できず、次のような wxWidgets が見つからないというエラーが常に表示されます。

$ ./wx-config.exe --prefix=/usr/local/
wx-config Error: wxWidgets hasn't been found installed at 'C:\MinGW\msys\1.0\loc
al'.

Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.

この問題を回避する方法はありますか?

ありがとう、

- アップデート -

@JP私が試した:

C:\temp\wxdirect-0.90.0.1>runhaskell Setup configure --extra-lib-dirs=c:\MinGW\lib --extra-include-dirs=c:\MinGW\include --extra-include-dirs=c:\MinGW\msys\1.0\local\include
Configuring wxdirect-0.90.0.1...

そして得た

Setup: At least the following dependencies are missing:
containers >=0.2 && <0.5, strict -any

コンテナ >=0.2 && <0.5 をバイパスするように wxdirect.cabal を微調整しましたが、厳密なパスを取得できません。

4

1 に答える 1

2

Windows 7 用の wxHaskell をビルドするために、MinGW のセットアップと wxWidgets のダウンロード/ビルドを自動化する powershell スクリプトを作成しました。

https://github.com/cessationoftime/wxHaskell-Windows-Builder

于 2014-11-30T05:35:48.823 に答える