LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Structure size changes from CVI 4.0.1 to CVI 5.5

I am in the process of updating some software which was written and compiled
under CVI 4.0.1. The first problem I encountered was that I could not
compile the code under CVI 5.5 unless the "#include " line was
moved to the top of the #includes in several files (I was seeing an error
about "Redeclaration of INT32" and "UINT32"). This seems to be recommended
by several references in the documentation and the Knowledge Base. However,
I have two (or three) questions that I hope someone can answer for me:

(1) Why is it that the #includes had to be reordered to compile under CVI
5.5, but they have always compiled fine under CVI 4.0.1? What changed?

(2) Upon reordering the headers and compiling t
he code under CVI 5.5, I have
found that several large structures have changed size (they have grown by
about 15% (~1700 bytes) according to "sizeof"). It is crucial that I
maintain these structures at their original size, for reading older data
files from disk. Why would reordering the #includes as I have described
possibly have changed the size of these structures??? (They consist of a
handful of nested structures, but it all boils down to shorts, ints, and
chars)

(3) The original platform for this software was Win95. I am currently
working under WinNT4. Could this possibly be related to the problem I am
seeing? It seems extremely unlikely that the size of INT32 would have
changed from 95 to NT, but I suppose stranger things have happened.
Alternatively, it could be that the structures are being packed differently,
but I don't know how to verify this.

Thanks in advance for any help!
Justin

Justin J. Goeres
Project Engineer
jgoeres@indiosystems.com
phone (925)485-5083 ; fax
(435)305-8044

Indio Systems, Inc.
5600-A Sunol Blvd.
Pleasanton, CA 94588
0 Kudos
Message 1 of 2
(2,904 Views)
> (2) Upon reordering the headers and compiling the code under CVI 5.5, I
have
> found that several large structures have changed size (they have grown by
> about 15% (~1700 bytes) according to "sizeof"). It is crucial that I
> maintain these structures at their original size, for reading older data
> files from disk. Why would reordering the #includes as I have described
> possibly have changed the size of these structures??? (They consist of a
> handful of nested structures, but it all boils down to shorts, ints, and
> chars)
The alignement default may have changed. There is an alignement #define
called WALIGN or something like that.
-----------------
Guillaume Dargaud
CNR/IFA
http://sung3.ifsi.rm.cnr.it/~dargaud/Hack/LabWindows.html
http://sung3.ifsi.r
m.cnr.it/~domec/
http://sodarserver.ifa.rm.cnr.it/
"Computer are like air conditioners: they stop working when you open
windows."
0 Kudos
Message 2 of 2
(2,904 Views)