Krasimir Angelov-2 wrote: > > Hi Matthew, > > On Windows stdout/stderr/stdin exists only when your application is > using the Console OS subsystem. All GUI applications doesn't have > console window and they don't have stdout/stderr/stdin. When you are > building DLLs then the subsystem is determined from the type of the > application that is loading your DLL. In your particular case the DLL > is loaded from Matlab which is definitely a GUI application. When you > are trying to load the DLL from other C application then probably it > is Console application and all print statements simply works. The > solution that you can use is to replace all your print statements with > Debug.Trace.trace or Debug.Trace.putTraceMsg. When you are using these > functions from Console application then the output is redirected to > stderr but when they are used from GUI application then the output > goes to the debugger. You can see the output in the Debug pane in the > Visual Studio IDE while you are running MatLab from the debugger. > > Cheers, > Krasimir > > >
Thanks for the suggestion. Unfortunately I use a lot of formatted print statements both in Haskell and in C. I was hoping for a quick fix. I can, however redirect some of my output to a file so this will help. -- View this message in context: http://www.nabble.com/How-can-I-redirect-stdout--tf2358554.html#a6607349 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
