Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Are you aiming specifically at rosmake (i.e. not make in a ROS package)?

The normal make with CMake is colored from CMake and to get colored warnings and errors from g++ I use colorgcc. Symlink /usr/bin/colorgcc to c++ in a directory at the front of your path (e.g. $HOME/bin/c++).

Are you aiming specifically at rosmake (i.e. not make in a ROS package)?

The normal make with CMake is colored from CMake and to get colored warnings and errors from g++ I use colorgcc. Symlink /usr/bin/colorgcc to c++ in colorgcc.

  1. Install colorgcc by sudo apt-get install colorgcc
  2. Define a directory at the front of where you will have executables in your path (e.g. $HOME/bin/c++).path, e.g. $HOME/bin (create bin in your home directory)
  3. Add this directory to your path, i.e. export PATH=$HOME/bin:$PATH. Prefereably put that line in your .bashrc or similar, so you only have to do this once
  4. In that directory create symlinks to colorgcc, i.e.:

    ~/bin$ ln -s /usr/bin/colorgcc c++ ~/bin$ ln -s /usr/bin/colorgcc g++ ~/bin$ ln -s /usr/bin/colorgcc gcc ~/bin$ ln -s /usr/bin/colorgcc cc

For CMake only the first line is required.

Are you aiming specifically at rosmake (i.e. not make in a ROS package)?

The normal make with CMake is colored from CMake and to get colored warnings and errors from g++ I use colorgcc.

  1. Install colorgcc by sudo apt-get install colorgcc
  2. Define a directory where you will have executables in your path, e.g. $HOME/bin (create bin in your home directory)
  3. Add this directory to your path, i.e. export PATH=$HOME/bin:$PATH. Prefereably put that line in your .bashrc or similar, so you only have to do this once
  4. In that directory create symlinks to colorgcc, i.e.:

 ~/bin$ ln -s /usr/bin/colorgcc c++
 ~/bin$ ln -s /usr/bin/colorgcc g++
 ~/bin$ ln -s /usr/bin/colorgcc gcc
 ~/bin$ ln -s /usr/bin/colorgcc cc

cc

For CMake only the first line is required.