At 23:36 2002-10-9 -0400, you wrote: >On Wednesday, October 9, 2002, at 10:58 PM, Ben Combee wrote: > >>>I've already thought of several ways to "work around" this bug, but I'd >>>rather not have to since I have other code that uses similar methods and >>>that would require making several architectural changes to our design. >>>I've played around with changing the order of initializing the classes >>>but that didn't seem to do anything. I was even willing to make the >>>CDatabase object a global by declaring: >>> >>>CDatabase tempDB; >>> >>>at the beginning of my CPP file, but that resulted in the internal >>>compiler error too. >> >>Hmmm, this is indicating that there's a problem with generating the >>constructor for CDatabase. This obviously doesn't happen all the > time. >> >>Here's a quick question -- are you using 2-byte integers or 4-byte >>integers? All the POL code is built for 2-byte ints, and using 4-byte >>ints in your code along with a precompiled header could cause > problems. > >Project settings show 2 byte integers are being used. > >Just for kicks I tried adding CDatabase to MyApp.h as a member variable >and got the same internal compiler error. I've used the CDatabase class in >several projects before this way and have never had any issues. Seems that >CDatabase (as well as CRecord) cause this internal compiler error. >CRecordStream is working fine though. Hmmm...
OK... I'm looking at the POL source, and I'm wondering what would happen if you wrote CDatabase *db = new CDatabase((void *)0); The default constructor for CDatabase just sets it internal DmOpenRef to NULL. A DmOpenRef is a typedef for a void pointer. This will ensure that the type conversions are right, which should be happening automatically. I've used CDatabase and CRecord in my own apps with this compiler, so it seems possible that something else that's been built is causing the problem with the CDatabase and CRecord constructors. The one thing I see in common is that both CRecord and CDatabase have default constructors that use "NULL" as a value, where NULL is defined as 0 or 0L, depending on what header is read. In the meantime, try two more things: 1) Exit the IDE and delete your project's _Data folder. This will clear out any compiler generated data. 2) In the POL Support folder, remove all of the .mch++ files and do a full rebuild on that library. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
