Re: mixing cout with gtk



Earlier version of GTM (the GNOME Transfer Manager) used to have this
problem.  It went away in newer versions.  You might want to email the
author and see what he did to fix it.

It's also possible he didn't fix it at all, and just when I tried the
newer version I had a newer compiler.  I can't see how upgrading your
compiler would hurt anything.

Good luck,

-----ScottG.

Scott Dattalo <scott@dattalo.com> writes:

> Has suddenly produced core dumps for me.
> 
> I've been using gtk for a few years now, but I'm stumped on this
> one. Perhaps somebody's seen this too and can help out. It appears
> that I'm unable to write to the cout stream. However, if I configure
> my program without the gui (there's a command line version too), the
> cout's work fine ?!?
> 
> Why all of a sudden? Well I upgraded from gtk 1.0.? to 1.2.8 and
> that's when I noticed the problems. I've done many `experiments'
> with my system... but suffice it to say that I'm now running
> gtk/glib 1.2.6 . I've attempted to remove all traces of old gtk/glib
> libraries and I'm fairly sure I've gotten them all. The 1.2.6
> version of glib/gtk were installed from RPMs. I've also installed
> the `devel' versions of gtk/glib.
> 
> I use automake - is there a check that's possibly being missed?
> 
> My system is basically a RH6.0 system with numerous upgrades. My gcc is old:
> $ gcc --version
> egcs-2.91.66
> 
> 
> (BTW, my project is gpsim, http://www.dattalo.com/gnupic/gpsim.html , a
> simulator for pic microcontrollers.)
> 
> Here's a snip of my `main.cc'.
> 
> ------------------------
> 
> void
> main (int argc, char *argv[])
> {
> 
>   cout << "this is a test with cout\n";
> 
> ------------------------
> 
> And here's the backtrace after it dumps core
> 
> #0  0x403377b2 in __overflow (f=0x80cddc0, ch=-1) at genops.c:197
> #1  0x403366b0 in _IO_new_file_xsputn (f=0x80cddc0, data=0x80ba57f, n=27) at
> fileops.c:802
> #2  0x80b22b4 in filebuf::xsputn (this=0x80cddc0, s=0x80ba57f "this is a test
> with cout a\n", n=27) at filebuf.cc:205
> #3  0x80af8b3 in ostream::operator<< (this=0x80cdec0, s=0x80ba57f "this is a
> test with cout a\n") at iostream.cc:784
> #4  0x8070d79 in main (argc=1, argv=0xbffffbf4) at main.cc:108
> #5  0x402f9cb3 in __libc_start_main (main=0x8070ce4 <main>, argc=1,
> argv=0xbffffbf4, init=0x806f53c <_init>, 
>     fini=0x80ba2cc <_fini>, rtld_fini=0x4000a350 <_dl_fini>,
> stack_end=0xbffffbec)
>     at ../sysdeps/generic/libc-start.c:78
> 
> 
> Any ideas?
> 
> Thanks,
> Scott
> 
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]