Wednesday, May 27, 2020

Emacs for C++

Started working with C++ recently in order to work with ROS. Had to make some changes to Emacs to make it work better with c++.

package installed rtags then built the rtags backend:

At the point of running `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .` ran into issues where it couldn't find `clang-c/Index.h`, On Ubuntu 16.04 (old desktop machine) even after running `apt install libclang-dev`. This was because it was installing only libclang-3.8-dev. libclang-6.0-dev needs to be installed with `apt install libclang-6.0-dev` in order to get the rtags backend to compile completely.

On laptop with Ubuntu 20.04, just installing libclang-dev worked. In fact, specifically installing libclang-6.0-dev caused more problems.