Mail Archives: cygwin-developers/1998/08/31/22:49:32
Does anybody have an idea why the streambuf vtable is not being
initialized correctly in cygwin32 apps? Basically, the following
fails:
#include <iostream.h>
struct Foo {
Foo () { cout << " creating foo." << endl;
~Foo () { cout << " deleting foo." << endl;
};
Foo foo;
int main () {
return 0;
}
Looks like the io jump tables aren't being initialized before main, and
the code in cout ends up trying to dereference a null pointer (to a
function _IO_xsputn or some such).
I don't understand cygwin startup enough to understand what's going on.
The complexity of libio doesn't help matters much either.
This works just fine under other x86-win32 targets.
Regards,
Mumit
- Raw text -