【问题标题】:Pointing CodeLite to new compiler (GCC 4.8.x)将 CodeLite 指向新的编译器 (GCC 4.8.x)
【发布时间】:2018-02-24 08:43:11
【问题描述】:
我在 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 编译器。我该怎么做?
【问题讨论】:
标签:
c++11
compiler-construction
g++
codelite
【解决方案1】:
【讨论】:
-
将退房。 IMO codelite 是目前最好的开源 C++ IDE。做了很多 Code::Blocks 没有做的事情,特别是重构选项和类生成向导等。在 Qt 中也表现得更好。将检查您的链接。 (我懒得找东西……)我不必编译 GCC 4.8 - 看看这个。 askubuntu.com/questions/271388/…。 Link 已经 4 个月大了 - 我用 4.8 代替了 4.7 的 aptitude,它奏效了。
【解决方案2】:
来自我们办公室的 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