gcc -Wall -pedantic -Wextra in Visual Studio

2019-07-10 03:59发布

On linux I have used these flags to compile with gcc

CFLAGS=-Wall -pedantic -g -Wextra -pthread

What are my options in VS to enable similar flags? Extra warnings, etc.

2条回答
仙女界的扛把子
2楼-- · 2019-07-10 04:30

You can use /Yd for enabling the placement of complete debugging information in all object files and /Wall for enabling all warnings, including warnings that are disabled by default.

More options here: https://msdn.microsoft.com/en-us/library/19z1t1wy.aspx

How to set them in case you don't know: https://msdn.microsoft.com/en-us/library/c553zwz0%28v=vs.90%29.aspx

查看更多
姐就是有狂的资本
3楼-- · 2019-07-10 04:39

As said on this page :

You can set compiler options for each project in its Property Pages dialog box. In the left pane, select Configuration Properties, C/C++ and then choose the compiler option category. The topic for each compiler option describes how it can be set and where it is found in the development environment. See Compiler Options for a complete list."

Compiler Options Listed Alphabetically

查看更多
登录 后发表回答