我试图在一台运行Windows XP64的机器上安装wxHaskell,使用的是使用gcc从源代码构建的MinGW/MSYS和wxWidget 3.0。我做到了:
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我问了一个问题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,但不能通过严格。
发布于 2014-11-30 13:35:49
为了为Windows7构建wxHaskell,我已经编写了一个powershell脚本,它可以自动设置MinGW和下载/构建wxWidgets。
https://github.com/cessationoftime/wxHaskell-Windows-Builder
https://stackoverflow.com/questions/22005678
复制相似问题