I've got a fairly large C++ application in Codewarrior that uses the
POL framework. Things were working fine until I added a Init method to
one of my custom classes that does something like:
void CMyClass::Init()
{
// create instances for helper classes
m_contactPtr = new Contact();
m_contactPDBPtr = new CDatabase;
// now open connection with databases
// to do - add code to check for failure
/*
if (m_contactPDBPtr->Create(0, "Contact", 'pol ', 'data') == 0)
{
// we are creating the new database
}
else
{
// the database already exists
m_contactPDBPtr->Open(0, "Contact");
}
}
When I compile using Codewarrior for Palm OS v8, I get the following
error message:
Error : internal compiler error: File: 'PCode.c' Line: 3836
CMyClass.cpp line 40 }
The strange thing is (1) I've never seen that type of message before
and have done similar things in the past and (2) I can successfully add
the above code to Codewarrior for Palm OS v6. I'm developing in Mac OS
X (Jaguar) and am completely stumped.
If I comment out the line "m_contactPDBPtr = new CDatabase;" everthing
compiles OK. However, I get the same internal compiler error if I add a
local CDatabase object to the above method:
void CMyClass::Init()
{
// create instances for helper classes
m_contactPtr = new Contact();
//m_contactPDBPtr = new CDatabase;
CDatabase tempDB;
// now open connection with databases
// to do - add code to check for failure
/*
if (tempDB.Create(0, "Contact", 'pol ', 'data') == 0)
{
// we are creating the new database
}
else
{
// the database already exists
tempDB.Open(0, "Contact");
}
}
Any ideas as to what might be happening??? I'm puzzled since it works
in one dev environment of CW but not the other / newer.
Thanks in advance.
Mark F Rodriguez
----------------------------------------
xAplos, Inc.
http://www.xaplos.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/