Ok at my previous workplace I had a task to call python written function in C++. Did a search on the internet and found a topic “Embedd python in C++” and after two days of reading and research I solved the task. Also did the same task by another way there is programming language called cython which syntax is pretty much similar to python, this language is just like python but with some c language functionalities, so what does it basically do is that you compile your cython code and it generates header and cpp files where are the declration and implementation of cython function and by this you include the header file in your c++ code and call it those function like regular c++ function.
So I am ready to help you to solve it!