我试图将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 –