Upravit

Sdílet prostřednictvím


/align switch

The /align switch is functionally the same as the MIDL /Zp option and is recognized by the MIDL compiler solely for backward compatibility with MkTypLib.

Note

The Mktyplib.exe tool is obsolete. Use the MIDL compiler instead.

 

midl /align:alignment

Switch Options

alignment

Specifies the alignment for types in the library. The alignment value can be 1, 2, 4, or 8. The value 1 indicates natural alignment; n indicates alignment on byte n. When you do not specify the /align switch, the default is 8.

Remarks

If you are generating a new makefile, use the /Zp switch.

The alignment value corresponds to the /Zp option value used by the Microsoft C/C++ compiler. Be sure that you specify the same alignment when you invoke the C compiler as when you invoke the MIDL compiler.

For more information, see your Microsoft C/C++ programming documentation. For a discussion of the potential dangers in using nonstandard packing levels, see the /Zp help topic.

Examples

midl /align:4 filename.idl

See also

General MIDL Command-line Syntax

/Zp