我試圖將wxHaskell安裝到運行Windows XP64的計算機上,使用gcc從源代碼創建MinGW/MSYS和wxWidget 3.0。我所做的:如何使用MinGW/MSYS在Windows上安裝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 shell腳本,陰謀(從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
我曾問一個問題https://stackoverflow.com/questions/21998763/how-to-convert-msys-shell-scripts-to-windows-exe-files,看看是否有可能腳本轉換爲一個可執行文件,但任何解決方案,無人迴應。
這裏還有一個相關的問題,wxHaskell installation on windows,另一個在這裏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
我調整wxdirect.cabal繞過容器> = 0.2 & & < 0.5,但不能通過嚴格。
我將第二這個問題,並添加的wxWidgets的下載/建築PowerShell腳本在Windows上安裝GUI的任何東西都太複雜了。 –
我已經勾畫出一種適合我的方式:http://jpmoresmau.blogspot.fr/2010/04/wxwidgets-and-wxhaskell-on-windows.html –