ODE:could not open stdin/stderr

 I noticed somebody had posted a problem about receiving the error 
> message "could not open stdin" when using ode with cygwin.  The 
> solution that worked for me was to edit the file 
> drawStuff/src/windows.cpp.  The line that produces the error message 
> is in that file, and enclosed in a block surrounded by an #ifndef 
> cygwin.  I just manually commented out the lines in this block, and it 
> now works fine.

// redirect standard I/O to a new console (except on cygwin and mingw)
#if !defined(__CYGWIN__) && !defined(__MINGW32__)
//FreeConsole();
//if (AllocConsole()==0) dsError (“AllocConsole() failed”);
//if (freopen (“CONIN$”,”rt”,stdin)==0) dsError (“could not open stdin”);
//if (freopen (“CONOUT$”,”wt”,stdout)==0) dsError (“could not open stdout”);
//if (freopen (“CONOUT$”,”wt”,stderr)==0) dsError (“could not open stderr”);
//BringWindowToTop (GetConsoleHwnd());
//SetConsoleTitle (“DrawStuff Messages”);
#endif

 


http://www.ode.org/old_list_archives/2006-September/020469.html

Advertisements