I\'m experimenting with python functions right now. I\'ve found a way to import python functions into c/c++ code, but not the other way around.
I have a c++ program
You need to create a python module with that function in it. There are three main ways:
This pdf covers 1 and 2. This page will tell you how to use Boost::Python.
You cannot (easily) use a function that is in a c/c++ program - it must be in a static library (which you can also link your c/c++ program against).
EDIT - Cython Is also worth a mention.