1. 程式人生 > >ubuntu下編譯小知識點

ubuntu下編譯小知識點

enabled with ubun set 改變 led 特性 enable The

1 #改變編譯器選項
2 SET(CMAKE_C_COMPILER"g++")
3 #出現如下錯誤:添加C++11特性
4 #error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
5  #error This file requires compiler and library support 6 #添加如下語句
7 SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")

ubuntu下編譯小知識點