I am trying to install Cling(interactive C++ interpreter) from here using the .sh file. While I run the .sh file in the terminal, I get the following errors:
cc1plus: error: unrecognized command line option ‘-std=c++11’
Since the default gcc for 12.04 is 4.6.3, I updated to gcc 4.8 to help remove C++11 errors, then ran the following commands to check which version of gcc is being used for compilation
gcc --version
gcc (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
I also tried to figure out the current priorities of gcc, as mentioned here,
update-alternatives --query gcc
Link: gcc
Status: auto
Best: /usr/bin/gcc-4.8
Value: /usr/bin/gcc-4.8
Alternative: /usr/bin/gcc-4.8
Priority: 50
But the "cc1plus"
error still remains. Is there a way to resolve this to help me run Cling seamlessly? Thanks!
EDIT: Followed this and also updated my g++ from default 4.6.3 to 4.8.1 and the dont see the C++11 error anymore.