问题描述
在linux上,我已使用这些标志与gcc进行编译
On linux I have used these flags to compile with gcc
CFLAGS=-Wall -pedantic -g -Wextra -pthread
我在VS中启用类似标志的选项是什么?额外的警告等.
What are my options in VS to enable similar flags? Extra warnings, etc.
推荐答案
您可以使用/Yd
启用在所有目标文件中放置完整的调试信息,并使用/Wall
启用所有警告,包括被禁用的警告.默认.
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.
此处有更多选项: https://msdn.microsoft.com/zh-我们/library/19z1t1wy.aspx
如果您不知道如何设置它们: https://msdn.microsoft.com/en-us/library/c553zwz0%28v=vs.90%29.aspx
How to set them in case you don't know: https://msdn.microsoft.com/en-us/library/c553zwz0%28v=vs.90%29.aspx
这篇关于Visual Studio中的gcc -Wall -pedantic -Wextra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!