我坚持在windows xp sp3上安装wxHaskell
我安装了MinGW,MSYS和wx-config
MinGW和带安装程序的MSYS
wx-config,将目录添加到环境变量WXWIN
和wxWigets with installer
当我输入
时cabal install wx
它说
generating: src/haskell/Graphics/UI/WXCore/WxcClassTypes.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 539 class definitions.
ok.
generating: src/haskell/Graphics/UI/WXCore/WxcClassInfo.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 381 class info definitions
ok.
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
ignore: parse error : //WXCOLORREF wxColour_GetPixel( TSelf(wxColour) _obj );
generating: src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs
reading class definitions:
parsing: src/include/wxc.h
parsing: src/include/wxc_types.h
parsing: src/include/wxc_glue.h
parsing: src/include/db.h
parsing: src/include/dragimage.h
parsing: src/include/graphicscontext.h
parsing: src/include/sound.h
parsing: src/include/managed.h
parsing: src/include/mediactrl.h
parsing: src/include/previewframe.h
parsing: src/include/printout.h
parsing: src/include/textstream.h
parsing: src/include/stc.h
parsing: src/include/stc_gen.h
generated 1560 methods for 120 classes.
generating: src/haskell/Graphics/UI/WXCore/WxcClassesMZ.hs
generated 2184 methods for 123 classes.
generating: src/haskell/Graphics/UI/WXCore/WxcClasses.hs
generated 3744 total methods for 243 total classes.
ok.
parsing: src/eiffel/wxc_defs.e
parsing: src/eiffel/wx_defs.e
parsing: src/eiffel/stc.e
generating: src/haskell/Graphics/UI/WXCore/WxcDefs.hs
generated 2454 constant definitions
ok.
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.
setup.exe: failed
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
帮助〜
谢谢!
答案 0 :(得分:1)
您的PATH environmnet变量中是否有wx-config.exe,以便cabal可以找到它?
此外,您可能会尝试定义环境变量WXCFG = gcc_dll \ mswu。
最后一次尝试:您是否使用正确的设置编译了wxWidgets(如:mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=1 UNICODE=1
)?
这就是我得到的全部。我有类似的问题,但我没有完全按照安装指南,所以也许你错过了一些东西。
答案 1 :(得分:0)
我认为您特别缺少的是该错误消息指定的WXWIN环境变量。如果您知道如何在Windows中设置环境变量(我相信它涉及系统属性,但您可以在线查看),请将WXWIN设置为wxWidgets目录,例如C:\ wxWidgets-2.8
然后再次尝试cabal install wxcore
查看本指南可能会有所帮助:http://www.haskell.org/haskellwiki/WxHaskell/Building
注意:我还没有尝试在Windows上构建wxHaskell,但是大多数其他wxHaskell用户似乎都在Windows上,所以我认为它必须是可能的!
编辑:抱歉!我注意到你在帖子中提到了WXWIN环境变量,所以我不确定究竟是什么问题。在cmd.exe中回显%WXWIN%以确保正确设置它可能很有用。另请注意,出于某种原因,您需要在cmd.exe中运行cabal install wx而不是在msys shell中运行
答案 2 :(得分:0)
我发现这有点麻烦,在尝试了各种网络帖子的几条建议后,让它发挥作用。这可能不是最佳路径,但经过多次排列和旋转之后,我很高兴能让它发挥作用。
安装wx-config - http://wiki.wxwidgets.org/Wx-Config - http://sites.google.com/site/wxconfig/
安装wxPack二进制文件 - http://wxpack.sourceforge.net/ - http://sourceforge.net/projects/wxpack/
安装wxWidgets(Windows二进制文件) (包含在wxPack中)
复制wxmsw28u_gcc.dll
来自:../ library / wxWidgets / lib / gcc_dll /
to:c:/ windows / system
安装wxhaskell - http://haskell.org/haskellwiki/WxHaskell - http://haskell.org/haskellwiki/WxHaskell/Download - http://downloads.sourceforge.net/wxhaskell/wxhaskell-bin-msw2.8.10-ghc6.10.4-0.11.1.2-0.zip
定义环境变量WXCFG = gcc_dll \ mswu (并确保wxwin在PATH上)
cabal install wx wxcore
如果使用Leksah;还可以重建系统数据,重新配置和构建项目。