diff --git a/src/interpreter.cc b/src/interpreter.cc index 5cb34ba48d49ce2ac1691f9e20600e80cb3d4709..b638e0cf1609de152a848d5fdca45533ca618b1f 100644 --- a/src/interpreter.cc +++ b/src/interpreter.cc @@ -47,7 +47,11 @@ Interpreter::Interpreter() { // load python dynamic library // this is silly, but required to be able to import dl module. +#ifndef WIN32 dlopen(libpython.c_str(), RTLD_LAZY | RTLD_GLOBAL); +#else + LoadLibrary(libpython.c_str()); +#endif Py_Initialize(); mainmod_ = PyImport_AddModule("__main__"); Py_INCREF(mainmod_);