The Mach-O application works fine before I upgrade to 10.3.9 and CW
9.5, and I notice the break after recompiled the header and library.
I had tried to reinstall CW 9.0 and only upgrade to 9.4 where it works
before, but the error still exists. I also removed
USER/Library/Preferences/Metrowerks folder before reinstall CW90, as
somebody suggested on board.
Is there anywhere else caching libraries or object files?
The compiling and linking have no problem, debugging run into "access
fault exception" error. The calling stack window shows:
1. start
2. start
3. start
4. dyld 0x8FE142A4
5. dyld 0x8FE17178
6. dyld 0x8FE176B0
7. __sinit_/MyCppFileWhichContainAStaticMemberVariable_cpp
8. std::_nInit::__nInit()
9 Metrowerks::bufferedbug<char, std::char_traits<char>
>::setbug(char*, int)
10. Metrowerks::bufferedbug<char, std::char_traits<char>
>::seekpos(std::fpos<int>, std::ios_base::openmode)
11. Metrowerks::bufferedbug<char, std::char_traits<char> >::is_open()
const
__nInit::__nInit()
{
Metrowerks::mutex::scoped_lock lock(get_stream_init_mutex());
static Metrowerks::console_inputbuf<char> fin(stdin);
static Metrowerks::console_outputbuf<char> fout(stdout);
static Metrowerks::console_outputbuf<char> ferr(stderr);
if (ninit_cnt_s++ == 0)
{
new (&cin)istream(&fin);
new (&cout)ostream(&fout);
new (&cerr)ostream(&ferr);
new (&clog)ostream(&ferr);
cin.tie(&cout);
cerr.setf(ios_base::unitbuf);
fin.pubsetbuf(0, 0);
fout.pubsetbuf(0, 0); // Note: linker call bufferedbuf::setbug(), but
this pointer of bufferedbuf is 0
ferr.pubsetbuf(0, 0);
}
}
Thanks,
Henry


|