Robotics StackExchange | Archived questions

Problem with CMAKE_CXX_COMPILER

Hi guys, I have a problem with my cmake compiler.

I have Ubuntu 14.04 LTS and ROS-Indigo. I had Cmake version 2.8.13 and gcc version 4.8. I wanted to update cmake and gcc compiler. Now I have cmake version 3.81 and gcc version 6.2.0. After that update i cannot build my packages. I'm getting erorr like that:

The CXX compiler identification is unknown
CMake Error in :
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

I think i have to change the path of the compiler but i do not know how. Could you help me? Should i remove ROS and install again?

Asked by Cayero on 2016-12-21 17:26:49 UTC

Comments

Answers

Install the g++ compiler

sudo apt-get install build-essential 

and then

sudo apt-get install g++

Asked by simbha on 2019-03-10 12:22:58 UTC

Comments