You might try using
something like the following in the headers that define structures and/or
classes that must have 1-byte alignment:
#pragma pack (push,
1)
// structure/class
definition
#pragma pack
(pop)
I may not have the
syntax quite right, but it should be close. You'd compile with the default
alignment, so all structures except those so bracketed would be 8-byte
aligned.
Or, if you're brave,
you could try recompiling Xerces. The best option would be to convince the
project management that 1-byte alignment is crazy when you're dealing with three
layers and at least one library from another source.
-----Original Message-----
From: Gopi Krishna [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: VC++ /Zp1....failure
From: Gopi Krishna [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 23, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: VC++ /Zp1....failure
HI,
Thanks
for the reply....
The
problem is,
Our
application has been divided into 3 layers. Presentation,control and the data
communication layers.
I am
writing the Data comm layer. I will get the C data structures from the
other layers in the zp1 format and
I need
to populate the structures after parsing the XML file received from the server.
So, I
cant change the alignment to /Zp8 (default).
How do
I get around with this problem??
Please
Help
Thanks
Gopi
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 2:13 AM
To: [EMAIL PROTECTED]
Subject: Re: VC++ /Zp1....failureYou must use the same structure alignment in your application the pre-compiled Xerces library uses. You could try rebuilding Xerces with the structure alignment you want to use, but I wouldn't recommend it.
The bottom line is you shouldn't be mucking with such an option unless you understand the ramifications.
Dave"Gopi Krishna" <[EMAIL PROTECTED]>
"Gopi Krishna" <[EMAIL PROTECTED]>
01/23/2002 11:33 AM
Please respond to xerces-c-dev
To: <[EMAIL PROTECTED]>
cc:
Subject: VC++ /Zp1....failure
HI,
I have a small cpp file where I will create a parser object as
DOMParser parser = new DOMParser();
....
,,....
and call
delete parser after that in the same block.
I created this in a VC++ Debug Mode. If I set the structure alignment option as /Zp8 ( default ),
everything works fine but when I change to /Zp1, it cribs at the line where i do
delete parser. The error is
DAMAGE: after Normal block(#48) at 0x010c.......
could anyone tell me why this is happening?
Your help will be Highly appreciated...
Regards and Thanks
gopi
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
