// this process builds a dynamic library wrapping other code extern "C" void dylfunc_compile() { // write a dylfunc for passed context content // compile it with g++ -shared -fPIC source.cpp -o source.so }