#include #include "mylib.h" extern "C" { DO_EXPORT int foo(void); } int foo(void) { auto bptr = std::make_shared(0); return *bptr; }