我坚持在windows xp sp3上安装wxHaskell。
我安装了MinGW,MSYS和wx-config
带有安装程序的MinGW和MSYS
wx-config,将目录添加到环境变量WXWIN
和带有安装程序的wxWigets
当我输入的时候
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帮帮忙~
谢谢!
发布于 2011-06-08 04:50:48
您是否在PATH环境变量中有wx-config.exe,以便cabal可以找到它?
此外,您可以尝试定义环境变量WXCFG=gcc_dll\mswu。
最后一次尝试:您是否使用正确的设置(如:mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=1 UNICODE=1)编译了wxWidgets?
我就知道这么多。我有类似的问题,但我只是没有完全按照安装指南,所以可能你错过了一些东西。
发布于 2011-06-08 02:00:53
我认为您特别遗漏的是该错误消息指定的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
发布于 2011-07-19 00:58:56
我发现这有点麻烦,在尝试了来自不同网站帖子的几个建议后,我得到了它的工作。这可能不是最优的路径,但在经历了多次排列和旋转之后,我很高兴它能正常工作。
安装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
从:../libraries/wxWidgets/lib/gcc_dll/到: 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安装wx wxcore
如果使用Leksah,还要重建系统数据,并重新配置和构建项目。
https://stackoverflow.com/questions/6264848
复制相似问题