How can I redirect PETScs stdout and stderr when programming with a GUI interface in Windows Developer Studio?
These directions where supplied by a user. You just need to add this extern “C” { int PASCAL WinMain(HINSTANCE inst,HINSTANCE dumb,LPSTR param,int show); }; #include “petsc.h” #include “mpi.h” int MyPrintError(const char error[],…){ printf(“%s”,error); return 0; } int main(int ac,char *av[]) { char buf[256]; int i; HINSTANCE inst; inst=(HINSTANCE)GetModuleHandle(NULL); PetscErrorPrintf = MyPrintError; buf[0]=0; for(i=1; i