Problem using g_io_add_watch
- From: sinsedrix <sinsedrix gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Problem using g_io_add_watch
- Date: Thu, 19 Jun 2008 16:32:37 +0200
Hello,
I'm having trouble using GIOChannel g_io_add_watch function.
* A sub-library I use opens and writes to a file like this:
FILE * f = fopen("./LogFile", "w+");
...
fprintf(f, "LogMessage\n");
* In my library, I get a GIOChannel on this file and try to add a watch on
it like this:
GIOChannel * io = g_io_channel_win32_new_fd(fileno(f));
...
g_io_add_watch(io, G_IO_IN, io_func, data);
Problem: When I call g_io_add_watch my application is crashing with no
explanation.
Goal: I'd like to update a GtkTextBuffer with a GIOFunc ("io_func").
(If I do not call this function, GIOChannel works fine)
Configuration:
- OS: Windows Vista (please do not whip me or tell me to go under linux).
- IDE: Eclipse
- Compiler: mingw32-gcc
- Make: mingw32-make
PS: I had a problem with GIOChannel before because I was using Cygwin gcc to
compile (linking with kernel32 and user32) and I read somewhere that I
should use MinGW gcc (linking with wsock32) instead, is it wright ?
And sorry for my english, I am French.
Thanks in advance.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]