[英]travis ci make -std=c++14 not recognized
I have the error g++: error: unrecognized command line option '-std=c++14'
when building my project with travis ci using premake ( https://travis-ci.org/S6066/Teal/builds/171980872 ) 我有错误
g++: error: unrecognized command line option '-std=c++14'
在使用premake使用travis ci构建我的项目时g++: error: unrecognized command line option '-std=c++14'
( https://travis-ci.org/S6066/Teal/builds/171980872 )
My premake script: https://github.com/S6066/Teal/blob/master/build/premake5.lua 我的预制脚本: https : //github.com/S6066/Teal/blob/master/build/premake5.lua
My travis ci file: https://github.com/S6066/Teal/blob/master/.travis.yml 我的travis ci文件: https : //github.com/S6066/Teal/blob/master/.travis.yml
Thanks for help. 感谢帮助。
Edit: g++ --version gives me 4.8.5, so the real problem is Travis won't compile with g++ 6 编辑:g ++ --version给我4.8.5,所以真正的问题是Travis无法使用g ++ 6进行编译
I did these scripts for a github project and c++14 works: 我为github项目做了这些脚本,而c ++ 14可以工作:
This is an example of a .travis.yml: 这是.travis.yml的示例:
sudo: required
dist: trusty
language: cpp
compiler: g++
install: export CXX="g++-5"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
notifications:
email:
on_success: never
on_failure: always
before_install: sudo apt-get update -qq
script: make --directory "Var & ReadOnly C++"
And this is the associated makefile: 这是关联的makefile:
all:
$(CXX) -std=c++14 main.cpp -I . -Os -Wall -Wextra -o Example
clean:
rm Example*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.