设置AppVeyor的C ++语言标准

问题描述 投票:0回答:1

我正在尝试使用AppVeyor构建一个使用一些c ++ 17功能的Visual Studio 2017 project。我将项目的语言标准设置为c ++最新版本,因此它在我的本地Visual Studio中编译良好,但AppVeyor无法成功构建它。我收到一堆这样的错误:

错误C7525:内联变量至少需要'/ std:c ++ 17'

Here's the AppVeyor page和这里是我的YAML文件的内容。

version: 1.0.{build}
image: Visual Studio 2017 Preview

init:
- ps: >-
    cd "C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\VC\Tools\MSVC\14.14.26428\include"

    svn checkout https://github.com/Microsoft/GSL/trunk/include/gsl

    cd C:\projects\fireemblem
environment:
  matrix:
   - additional_flags: "/std:c++latest"

before_build:
  - set CXXFLAGS=%additional_flags%

build:
  verbosity: normal
c++ msbuild visual-studio-2017 appveyor
1个回答
0
投票

确保为项目文件中的每个配置设置了<LanguageStandard>stdcpplatest</LanguageStandard>,而不是仅为win32 Debug配置。

© www.soinside.com 2019 - 2024. All rights reserved.