
4 Dec
2006
4 Dec
'06
10:10 a.m.
Krasimir Angelov wrote:
How many times you tried to use putStrLn from Haskell or printf from C when you are building DLL loaded in GUI application?
This simply doesn't work because by default the GUI application doesn't have console window. The solution is to use allocConsole/freeConsole from the attached library.
Example:
do allocConsole ..... ..... putStrLn "Hello, world!" ..... ..... freeConsole
This could be a good addition to the standard Win32 library if someone take care to integrate it.
So that we don't lose this: will someone propose a patch to packages/Win32? Cheers, Simon