what are the steps to create c++ extension for libre office

Hi, I am trying to create extension for libre office using C++. Can you please suggest some step by step guide to create an extension/ plugin for libre office. It will be great if you can provide me the tools that would be required to do this development too