繁体   English   中英

在 windows 上安装 wxHaskell

[英]wxHaskell installation on windows

我坚持在 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

帮助~

谢谢!

您的 PATH environmnet 变量中是否有 wx-config.exe,以便 cabal 可以找到它?

此外,您可以尝试定义环境变量 WXCFG=gcc_dll\mswu。

最后一次尝试:您是否使用正确的设置编译了 wxWidgets(例如: mingw32-make -f makefile.gcc BUILD=release MONOLITHIC=1 SHARED=1 UNICODE=1 )?

这就是我得到的。 我有类似的问题,但我根本没有完全遵循安装指南,所以也许你错过了一些东西。

我认为您特别缺少的是该错误消息指定的 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

我发现这有点麻烦,在尝试了各种 web 帖子的一些建议后,让它工作了。 这可能不是最佳路径,但经过多次排列和调整,我很高兴让它发挥作用。

安装 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 Binary) (包含在 wxPack 中)

复制 wxmsw28u_gcc.dll
从:../libraries/wxWidgets/lib/gcc_dll/ 到:c:/windows/system

install 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 上)

阴谋集团安装 wx wxcore

如果使用 Leksah; 还重建系统数据,重新配置和构建项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM