Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.36 KB

command-line-error-d8048.md

File metadata and controls

24 lines (16 loc) · 1.36 KB
description title ms.date f1_keywords helpviewer_keywords
Learn about causes and solutions for command-line error D8048
Command-Line Error D8048
04/18/2021
D8048
D8048

Command-line error D8048

cannot compile C file 'file-name' with /ZW option

Only C++ source code files can be passed to the compiler when you use the /ZW (Windows Runtime compilation) compiler option.

Remarks

By default, all files in a C++ Universal Windows platform (UWP) project are compiled by using the /ZW compiler option. The /ZW option enables the Windows Runtime compiler extensions, or C++/CX. Unfortunately, /ZW doesn't work on C source files.

You can disable C++/CX compilation selectively for C files in Visual Studio projects. Select your C file in Solution Explorer, then right-click to choose Properties from the shortcut menu. In the Property Pages dialog, select the Configuration Properties > C/C++ -> General property page. Set the Consume Windows Runtime Extension property to No. Choose OK to save your changes.

For more information, see Component Extensions for .NET and UWP.

See also

/ZW (Windows Runtime compilation)