選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

16 行
678B

  1. #!/bin/bash
  2. set +e
  3. set -o pipefail
  4. # Assuming g++ and gcc are located in /usr/bin/
  5. update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 50 > /tmp/.switch-to-g++.stdout
  6. update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 50 >> /tmp/.switch-to-g++.stdout
  7. update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++ 50 >> /tmp/.switch-to-g++.stdout
  8. update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc 50 >> /tmp/.switch-to-g++.stdout
  9. # You might also want to update ld, depending on your requirements
  10. # update-alternatives --install /usr/bin/ld ld /path/to/your/ld 50 >> /tmp/.switch-to-g++.stdout
  11. echo "Compiler set to: $(readlink /etc/alternatives/c++)"