Compiler and Linker options (C++/CX)
An environment variable, C++/CX compiler options, and linker options support the building of apps for the Windows Runtime.
The %LIBPATH% environment variable specifies the default path to search for .winmd files.
Enables Windows Runtime language extensions.
The nostdlib parameter prevents the compiler from using the standard, predefined search path to find assembly and .winmd files.
The /ZW compiler option implicitly specifies the following compiler options:
Adds a directory, which is specified by the dir parameter, to the search path that the compiler uses to find assembly and .winmd files.
Forces the inclusion of the specified module, or .winmd file. That is, you don't have to specify #using file in your source code. The compiler automatically forces the inclusion of its own Windows metadata file, Platform.winmd.
Creates a definition that enables the use of a subset of the Win32 SDK that's compatible with the Windows Runtime.
Marks the executable as runnable in the appcontainer (only).
Emits a .winmd file and an associated binary file. This option must be passed to the linker for a .winmd to be emitted.
NO—Doesn't emit a .winmd file, but does emit a binary file.
ONLY—Emits a .winmd file, but doesn't emit a binary file.
The name of the .winmd file to emit, instead of the default .winmd file name. If multiple file names are specified on the command line, the last name is used.
Partially signs the .winmd file and places the public key in the binary.
NO—(Default) Doesn't sign the .winmd file.
/WINMDDELAYSIGN has no effect unless /WINMDKEYFILE or /WINMDKEYCONTAINER is also specified.
Specifies a key container to sign an assembly. The name parameter corresponds to the key container that's used to sign the metadata file.
Specifies a key or a key pair to sign the assembly. The filename parameter corresponds to the key that's used to sign the metadata file.
When you use /ZW, the compiler automatically links to the DLL version of the C Runtime (CRT). Linking to the static library version is not allowed, and any use of CRT functions that are not allowed in a Windows 8.x Store app will cause a compile-time error.