我在 Ubuntu 12.04 LTS 上运行CodeLite 5.2(从 13.04 降级,目前存在一些稳定性问题)。
我刚刚安装了 GCC 4.8 编译器,它不是 12.04 上默认的 GCC 编译器。我需要这个编译器来获得它支持的所有 C++ 11 功能,并且默认情况下,13.04 附带的编译器使用“-std=c++11”开关。
所以现在我安装了 4.8 编译器,但我不知道如何告诉 CodeLite 使用该编译器而不是 12.04(4.4.x?)附带的默认 GCC 编译器。我该怎么做呢?
我在 Ubuntu 12.04 LTS 上运行CodeLite 5.2(从 13.04 降级,目前存在一些稳定性问题)。
我刚刚安装了 GCC 4.8 编译器,它不是 12.04 上默认的 GCC 编译器。我需要这个编译器来获得它支持的所有 C++ 11 功能,并且默认情况下,13.04 附带的编译器使用“-std=c++11”开关。
所以现在我安装了 4.8 编译器,但我不知道如何告诉 CodeLite 使用该编译器而不是 12.04(4.4.x?)附带的默认 GCC 编译器。我该怎么做呢?
我刚刚通过阅读您的问题发现了CodeLite的存在。
我很快找到了在 CodeLite中使用的说明clang
只需跟随他们,用gcc-4.8(或你的gcc4.8 的完整路径)替换clang和g++-4.8替换clang++
顺便说一句,我希望您确实使用 脚本--program-suffix=-4.8选项编译了 GCC 4.8.1。..../configure
来自我们办公室的 Linux 大师:
这些命令应以超级用户 ( sudo) 身份运行:
apt-get install g++-4.8.1
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8.1 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 100
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8.1 50
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 100
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.8.1 50
update-alternatives --set g++ /usr/bin/g++-4.8.1
update-alternatives --set gcc /usr/bin/gcc-4.8.1
update-alternatives --set cpp-bin /usr/bin/cpp-4.8.1