Install clang and llvm
sudo apt-get install clang
sudo apt-get install llvm
Install dev dependencies for clang
sudo apt-get install libc++-dev
sudo apt-get install libc++abi-dev
Install debugger tools
sudo apt-get install lldb
sudo apt-get install liblldb-dev
Download and build lldb-mi:
git clone https://github.com/lldb-tools/lldb-mi
cd lldb-mi
cmake -DLLDB_DIR=/usr/lib/llvm-14/lib/ .
make
Run the command:
clang++ -std=c++11 -stdlib=libc++ <filename>.cpp -o <output-file>
add -v
at the end for verbose output.
Then run the output file
./<output-file>