LINK /FILEALIGN

This option sets the file alignment for the executable.

Syntax

/filealign:number

It is a fatal error (LNK1147) if the required argument is not a number. Characters up to and including an equals sign in number are ignored without complaint.

If number is not a power of two, it is ignored with a warning (LNK4043). The text for warning LNK4043 reads as if LINK reverts to a default when asked to set a section alignment that is not a power of two. This is not strictly true. The invalid number is just ignored. If an earlier /filealign set a valid section alignment, then the earlier setting persists.

The /filealign option is for the command line only. It is not valid as a directive in an object file.