After a lot of hassles with getting g++ 4.2.3 running on AIX 5.3 I'm ready
with the next problem. Is it just me or is there a trend with these bugs on
AIX!? :-)

Now I'm trying to get some unittest code working more specifically
http://unittest-cpp.sourceforge.net/
For the output stream I setup a ofstream object.

It looks like the code attached at the bottom. ofstream causes another weird
bug on AIX which results in all files being written has zero size. After
several hours of debugging I replaced the ofstream object with fstream which
works much better.
However this in turn causes seg faults on main() exit.

Below is the gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1]
0x10019bf0 in std::locale::~locale (this=) at _start_ :156
156 _start_ : No such file or directory.
in _start_
(gdb) bt
#0 0x10019bf0 in std::locale::~locale (this=)
at _start_ :156
#1 0x10019f14 in std::ios_base::~ios_base (this=)
at _start_ :100
#2 0x100007d4 in main ()

Has anyone seen anything like this before?

Thanks.

-- Henrik

----

int main(int argc, char *argv[])
{
int nRet;

if (argc != 2)
{
printf("Usage %s: \n", argv[0]);
return 1;
}

ofstream XmlFile(argv[1]);

UnitTest::XmlTestReporter XmlReporter(XmlFile);
nRet = UnitTest::RunAllTests(XmlReporter);

printf("Unittest errors: %d\n", nRet);

XmlFile.close();
return nRet;
}