Compiled OpenGL program has DOS window?

Hi. I'm working in Windows on an OpenGL application. I finally got everything working, doing all of my testing through the interpreter. When I finally compiled and ran the program from an executable for the first time I noticed that before creating my OpenGL window an empty DOS prompt popped up. I think I understand why the computer would want to do that, but I don't know how to make it stop. I've done some OpenGL in C++ and I remember having a similar problem. If I remember correctly the problem was fixed with a compiler flag. I'm using GHC and I looked through their compiler flags, but I didn't find anything that looked like it would deal with this. Anyone have any ideas? -Eitan

I vaguely recall that there is a way to avoid this if you don't import
any terminal functions or something similar. I don't remember the
specifics though.
Sorry I couldn't be of more help!
On Fri, Aug 13, 2010 at 4:18 PM, Eitan Goldshtrom
Hi. I'm working in Windows on an OpenGL application. I finally got everything working, doing all of my testing through the interpreter. When I finally compiled and ran the program from an executable for the first time I noticed that before creating my OpenGL window an empty DOS prompt popped up. I think I understand why the computer would want to do that, but I don't know how to make it stop. I've done some OpenGL in C++ and I remember having a similar problem. If I remember correctly the problem was fixed with a compiler flag. I'm using GHC and I looked through their compiler flags, but I didn't find anything that looked like it would deal with this. Anyone have any ideas?
-Eitan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, 13 Aug 2010 10:18:22 +0200, Eitan Goldshtrom
Hi. I'm working in Windows on an OpenGL application. I finally got everything working, doing all of my testing through the interpreter. When I finally compiled and ran the program from an executable for the first time I noticed that before creating my OpenGL window an empty DOS prompt popped up. I think I understand why the computer would want to do that, but I don't know how to make it stop. I've done some OpenGL in C++ and I remember having a similar problem. If I remember correctly the problem was fixed with a compiler flag. I'm using GHC and I looked through their compiler flags, but I didn't find anything that looked like it would deal with this. Anyone have any ideas?
-Eitan
You can do this with the flag -optl-mwindows; this passes the flag -mwindows to the linker. Because this is a linker option, you cannot find it in the GHC documentation. This solution also works for other GUIs, like wxHaskell. Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --

Hello Henk-Jan, Friday, August 13, 2010, 2:23:58 PM, you wrote:
You can do this with the flag -optl-mwindows; this passes the flag -mwindows to the linker. Because this is a linker option, you cannot find it in the GHC documentation. This solution also works for other GUIs, like wxHaskell.
it may be added to some GHC FAQ though -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Fri, 13 Aug 2010 12:29:52 +0200, Bulat Ziganshin
Hello Henk-Jan,
Friday, August 13, 2010, 2:23:58 PM, you wrote:
You can do this with the flag -optl-mwindows; this passes the flag -mwindows to the linker. Because this is a linker option, you cannot find it in the GHC documentation. This solution also works for other GUIs, like wxHaskell.
it may be added to some GHC FAQ though
I have added it to the HaskellWiki page GHC/FAQ [0] Regards, Henk-Jan van Tuyl [0] http://www.haskell.org/haskellwiki/GHC/FAQ#A_DOS_shell_opens_when_my_program... -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --
participants (4)
-
Bulat Ziganshin
-
Eitan Goldshtrom
-
Henk-Jan van Tuyl
-
Lyndon Maydwell