How to get rid of the black console window for a compiled Haskell GUI application
Asked Answered
K

1

8

I have compiled a Haskell GUI application with stack-1.7.1, ghc-8.2.2, gtk+-2.24.28 and glade-3.8. When I run the executable, a black console window always follows the GUI window. I want to get rid of it, but I don't find any tips about Haskell GUI application. I'm still new to Haskell, especially to the Haskell compilation. So I'm sorry if this is an easy task, but I appreciate it if anybody could give me some tips.

Knawel answered 25/6, 2018 at 1:10 Comment(0)
H
6

Add this to your .cabal file:

if os(windows)
    ghc-options: -optl-mwindows

If you don't use cabal for building your project, simply pass -optl-mwindows to ghc.

Hobble answered 25/6, 2018 at 1:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.