[Kde-bindings] Qt's use of global endl

David Hallas Andersen david at hallas.nu
Tue Jan 23 07:06:28 UTC 2007


On Monday 22 January 2007 19:38, Caleb Tennis wrote:
> I've been researching a crash, and I'm wondering if anyone else can
> recreate it:
>
> It seems as though in QTextStream some global methods are defined as
> convenience functions so that you can do this:
>
> QTextStream str(&blah);
> str << "something" << endl;
>
> Where 'endl' is a global function defined in QTextStream so as to give it
> the same workings as the cerr/cout/cin streams of standard C++.
>
> However, I've found that if I load Qt4 qtruby into memory followed by
> another library's ruby bindings, if the second library utilized any
> streamed output with "endl"s in it, the program crashes.  If I load the
> secondary library BEFORE loading Qt4 qtruby, then everything is okay.
>
> In my head I'm not sure why this is; I would have thought that the binding
> to endl (after a "using namespace std;") would have been set at compile
> time so that runtime loading wouldn't matter, but it seems to.
>
> I'm curious if anyone else has seen this or can recreate it?  I can't even
> think of a good way to work around it, if it is truly what's happening
> here.
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

Hi Caleb,

can you load libstdc++ into memory before the 2 libs that makes trouble, and 
see if it changes anything?

-- 

Cheers...

/David



More information about the Kde-bindings mailing list