Windows c compiler options




















Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. This table contains an alphabetical list of compiler options. For a list of compiler options by category, see the Compiler options listed by category article. Skip to main content.

This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Your first walkthrough task is to find the right shortcut to use. A developer command prompt shortcut automatically sets the correct paths for the compiler and tools, and for any required headers and libraries. Some of these values are different for each build configuration. You must set these environment values yourself if you don't use one of the shortcuts.

Because the build environment is complex, we strongly recommend you use a developer command prompt shortcut instead of building your own. These instructions vary depending on which version of Visual Studio you are using. To see the documentation for your preferred version of Visual Studio, use the Version selector control. It's found at the top of the table of contents on this page.

If you've installed Visual Studio on Windows 10 or later, open the Start menu, and choose All apps. Then, scroll down and open the Visual Studio folder not the Visual Studio app.

If you're using a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut.

You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window.

In the command prompt window, enter cl and verify that the output looks something like this:. You must fix this issue before you can continue. Or, reinstall the Build Tools from the Visual Studio downloads page.

Don't go on to the next section until the cl command works. Depending on the version of Windows on the computer and the system security configuration, you might have to right-click to open the shortcut menu for the developer command prompt shortcut and then choose Run as Administrator to successfully build and run the program that you create by following this walkthrough.

This directory will hold your source file and the compiled program. Enter notepad hello. In the Notepad alert dialog that pops up, choose Yes to create a new hello. Switch back to the developer command prompt window. You cannot start it from a system command prompt or from File Explorer. The linker produces executable. All compiler options are case-sensitive.

Compiler Options Listed Alphabetically. Compiler Options Listed by Category. The topic for each compiler option discusses how it can be set in the development environment. For information on specifying options outside the development environment, see:.



0コメント

  • 1000 / 1000