If you get an error like this
cc1plus: error: unrecognized command line option ‘-std=c++11’
Then
Step 1 : Update your gcc/g++ compiler to the latest version
Step 2 :
cc1plus: error: unrecognized command line option ‘-std=c++11’
Then
Step 1 : Update your gcc/g++ compiler to the latest version
Step 2 :
Change the line
SET( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-deprecated -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -DUNIX_ENVIRONMENT -DHAVE_NAMESPACES -DHAVE_STD " )
to the line below by splitting the parameters. (http://stackoverflow.com/questions/10984442/how-to-detect-c11-support-of-a-compiler-with-cmake.)
SET( CMAKE_CXX_FLAGS "-std=c++11 -Wall " )
SET( CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-narrowing -DUNIX_ENVIRONMENT -DHAVE_NAMESPACES -DHAVE_STD " )
Hope this solve the issue.
If it doesnt,
then
Step 3 : GOOGLE :)
No comments:
Post a Comment