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 to open. It does so, anyway, so my question: What must I do so that the program starts without opening a prompt window first? Is there some ghc switch for this?
+2
A:
I don't have access to GHC on Windows, but it looks like you need to tell linker to use "windows" subsystem. ghc -optl-mwindows ...
may work.
rkhayrov
2010-06-11 18:38:38
+2
A:
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.
camccann
2010-06-11 18:39:57
Thanks! That worked!
martingw
2010-06-11 20:13:22
Also, make an installer using [bamse](http://hackage.haskell.org/package/bamse).
TomMD
2010-06-11 22:22:14