From 1a98074b66deabe20c2ea95d2bc3441f06b1283b Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 29 Aug 2007 14:17:00 +0000 Subject: [PATCH] Mac: Redirect stderr to gfx_stderr.txt so we have a way to get error messages from system for graphics app svn path=/trunk/boinc_samples/; revision=13492 --- checkin_notes | 6 +++++- example_app/uc2_graphics.C | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 81261c9d75..24e85702c7 100644 --- a/checkin_notes +++ b/checkin_notes @@ -423,7 +423,11 @@ David 17 Aug 2007 Charlie 29 Aug 2007 - Mac: new XCode project for version 6 example_app. - + - Mac: Redirect stderr to gfx_stderr.txt so we have a way to get + error messages from system for graphics app. + + example_app/ + uc2_graphics.C mac_build/ UpperCase2.xcodeproj/ project.pbxproj diff --git a/example_app/uc2_graphics.C b/example_app/uc2_graphics.C index 37db6d897e..f68eef55a7 100644 --- a/example_app/uc2_graphics.C +++ b/example_app/uc2_graphics.C @@ -242,6 +242,10 @@ static void parse_project_prefs(char* buf) { } int main(int argc, char** argv) { +#ifdef __APPLE__ + // Provide a way to get error messages from system + freopen("gfx_stderr.txt", "w", stderr); +#endif shmem = (UC_SHMEM*)boinc_graphics_get_shmem("uppercase"); boinc_parse_init_data_file(); boinc_get_init_data(uc_aid);