[英]How to set C++ compiler flags in Visual Studio(2015
I want to set some compiler flags in visual studio 2015 for a C++ program but I can't see how.我想在 Visual Studio 2015 中为 C++ 程序设置一些编译器标志,但我看不到如何设置。 Using another IDE (CodeBlocks) I can select the following with a tick box:
使用另一个 IDE(代码块),我可以使用复选框选择以下内容:
Have g++ follow the C++11 ISO C++ language standard让 g++ 遵循 C++11 ISO C++ 语言标准
Also, I can create my own new flag (with name, Compiler flags and linker flags set )此外,我可以创建自己的新标志(设置名称、编译器标志和链接器标志)
How can I modify and create these two flags on VS2015 ?如何在 VS2015 上修改和创建这两个标志?
I've checked https://msdn.microsoft.com/en-us/library/hhzbb5c8.aspx?f=255&MSPPError=-2147217396 but no luck.我检查过https://msdn.microsoft.com/en-us/library/hhzbb5c8.aspx?f=255&MSPPError=-2147217396但没有运气。
**here is a picture of codeblocks ide and compiler settings **这是代码块ide和编译器设置的图片
**edit here is VS2015 configuration settings **这里编辑的是VS2015配置设置
您可以通过选择项目属性 -> 配置属性 -> C/C++ -> 命令行来添加选项,然后将它们添加到底部的“附加选项”部分。
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.
在左窗格中,选择配置属性、C/C++ ,然后选择编译器选项类别。
Update: To add language specification use /std flag.更新:要添加语言规范,请使用/std标志。 Append it at the end of existing flags in Command Line option page.
将其附加到命令行选项页面中现有标志的末尾。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.