LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory alignment problem with CVI 2013

Solved!
Go to solution

Hi,

 

I've just installed CVI 2013 coming from CVI 2010 and, opening my old projects, I'm getting in troubles with the memory alignement.

Not in all the projects I open I get the problem, and I'm quite confused about it.

I was used to keep memory aligned with 1 byte boundary and I have thousands and thousands of file saved with this method.

I have prepared a very simple project (attached to this post) to show you the problem, consider that with CVI 2010 the result would have been "5 bytes occupation".

 

Does pragma pack() change its behaviour?

Is there any flag to set into the Options menu or somewhere else?

 

If anybody has a suggestion please help me.

Thanks

Sergio

 

0 Kudos
Message 1 of 2
(3,809 Views)
Solution
Accepted by topic author Laser

Hi,

 

I've found the problem, there is a semicolon that follows the preprocessor directive #pragma pack(1) and it causes the pragma to be ignored.

Removing the semicolon, anything works properly.

 

Sorry!

Sergio

Message 2 of 2
(3,804 Views)