How to use libgromacs to implement MD?

GROMACS version: 2022
GROMACS modification: No

I have been reading Using GROMACS as a library for a while, however, I cannot write a C++ program to run a molecular dynamic simulation so far.

I really appreciate it if anyone could tell me where to find an executable example to run a molecular dynamics simulation using libgromacs with C or C++.

Or if anyone who run MD simulation same to “gmx mdrun -deffnm md” with libgromacs successfully can send me an example is very helpful for me.