How can I compile a GUI executable with ghc?

后端 未结 2 1300
我在风中等你
我在风中等你 2021-01-06 08:52

I ported a little Haskell program I wrote from Mac to Windows. It\'s a GUI application (wxHaskell, compiled with ghc 6.12.1), so it does not need the command prompt window t

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 09:25

    When using wxWidgets with cygwin, you can avoid having a console window appear by passing the -mwindows flag to the linker. You can tell GHC to pass flags to the linker using the -optl prefix, so you could try building with -optl-mwindows and see if that works.

    I've done that before when building a Haskell SDL application on Windows, and it worked for me. I think the -mwindows flag is cygwin-specific though, and I'm not sure what your install of GHC might be using as a linker.

提交回复
热议问题