Re: g_message and g_warning under Windows
- From: Tor Lillqvist <tml iki fi>
- To: Richard Gipps <rgipps netspace net au>
- Cc: , rjshaw netspace net au, gtk-app-devel-list gnome org
- Subject: Re: g_message and g_warning under Windows
- Date: Mon, 14 Feb 2005 23:10:26 +0000
Richard Gipps writes:
stream = freopen("error.log","w",stderr);
g_message("g_message_test");
fprintf(stderr,"fprintf_test");
which sits in the init function for my main window class. The fprintf
statement works fine, but the g_message() function seems to do nothing.
Hmm, sorry, actually what's needed is not freopen() but a
dup2(). gmessages.c in 2.6 doesn't use stdio on Windows any longer,
but plain write() to file descriptor 1 or 2, like on Unix.
I.e. something like
fd = open ("error.log", O_WRONLY);
dup2 (fd, 2);
g_message ("blah\n");
should work, I hope.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]