06-16-2005 12:37 PM
06-16-2005 04:55 PM
@lou 83 wrote:
I need information about the struct member alignment setting when compiling DLLs for use with LabVIEW. In my DLL, I also make function calls to a rendering library, VTK, that was compiled with 8 byte alignment. My DLL will only work if compiled with 8 byte alignment. If I compile it with 1 byte, I get obvious bad struct alignment issues and functions that perform deep copies to struct members cause fatal memory errors, which makes sense. But I'm confused since the LabVIEW documentation says that the struct member alignment should be set to 1 byte for all projects.
So why does it work with 8 byte?
Am I taking a risk by using 8 byte?
If I only make calls to the 8 byte compiled library then is it even an issue?
Should I compile the rendering library with 1 byte so that I can compile my DLL with 1 byte as well?
Are LabVIEW CIN functions compiled with 1 byte; is that the reason?
I guess I just need to know why DLLs for LabVIEW should be compiled with 1 byte alignment and if this rule can be bent.
Any information is greatly appreciated.
thank you,
Louis