简体   繁体   English

Jetbrains CLion [GCC链接]

[英]Jetbrains CLion [GCC linking]

I have just install Jetbrains CLion IDE for C/C++ and it argues that it cannot find cmake compiler: 我刚刚安装了适用于C / C ++的Jetbrains CLion IDE,它认为找不到cmake编译器: 喷气脑 I cannot find such tutorials on linking the compiler to the IDE even in the official website of Jetbrains. 即使在Jetbrains的官方网站上,我也找不到有关将编译器链接到IDE的此类教程。 Also it says in the website that it supports gcc compiler and I do have that: 它还在网站上说它支持gcc编译器,我确实有: 在此处输入图片说明 I am really new in Linux world and it's very different than Windows(where I came from weeks ago) and I do really really want to use this IDE for my c++ programming, here is the CLions Toolchain settings: 我真的是Linux世界中的新手,它与Windows(几周前的版本)有很大的不同,我真的很想在我的c ++编程中使用此IDE,这是CLions工具链设置: 在此处输入图片说明 You can see that 'C++ Compiler: not found' in the Toolchains tab. 您可以在“工具链”选项卡中看到“未找到C ++编译器”。

In the CMake tab this is what I have: 在CMake选项卡中,这是我所拥有的: 在此处输入图片说明

To turn my comment into a proper answer. 将我的评论变成正确的答案。

The problem is the missing g++ binary. 问题是缺少g++二进制文件。 In Debian based systems the different compiler front ends of gcc are packaged separately. 在基于Debian的系统中, gcc的不同编译器前端分别打包。 Only gcc , the C compiler is installed by default. 默认情况下仅安装gcc ,C编译器。

So to use the C++ compiler ( g++ ), one needs to install it by hand, there is a package of the same name. 因此,要使用C ++编译器( g++ ),需要手工安装它,其中有一个同名的软件包。

sudo apt-get install g++

Takes care of everything, so you have a working C++ environment. 照顾好一切,因此您拥有一个工作的C ++环境。

You need to install the needed tools: 您需要安装所需的工具:

Run in Terminal: 在终端中运行:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update
sudo apt-get install make
sudo apt-get install g++

Then restart the IDE and everything should run like a charm! 然后重新启动IDE,所有内容都应运行正常!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM