New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 12.04 make fails cc1plus error: unrecognized command line option ‘-std=gnu++11’ #588

Closed
Bloodyaugust opened this Issue Feb 2, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@Bloodyaugust

Bloodyaugust commented Feb 2, 2015

As above. I have a sneaking feeling this isn't solvable by any issues with the source... but an hour of fruitless searching on the '-std=gnu++11' option have led me to ask here.

cmake version 2.8.7

@dacap

This comment has been minimized.

Member

dacap commented Feb 2, 2015

Hi! Maybe that flag is wrong. What gcc --version does Ubuntu include? Could you try -std=c++11 or -std=c++0x here?

@dacap dacap added the linux label Feb 2, 2015

@dacap dacap self-assigned this Feb 2, 2015

@Bloodyaugust

This comment has been minimized.

Bloodyaugust commented Feb 3, 2015

I'm on 4.6.3.
I did use cmake with the "Unix Makefiles" option... perhaps I should try another?

@dacap

This comment has been minimized.

Member

dacap commented Feb 5, 2015

Unix Makefiles should be fine. Did you try to change -std=gnu++11 with -std=c++11 or -std=c++0x?

https://github.com/aseprite/aseprite/blob/master/src/CMakeLists.txt#L154

if(UNIX)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -std=gnu++11")
endif()
@dacap

This comment has been minimized.

Member

dacap commented Jun 12, 2015

Hi @Bloodyaugust. I've see this issue and as the C++11 support in 4.6 is not as complete as gcc 4.8, you should use gcc 4.8. You can install gcc-4.8 package:

sudo apt-get install g++-4.8

And then, before you run cmake:

export CXX="g++-4.8"

@dacap dacap closed this Jun 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment