From 3369deb18988dca48b53e88190af870acb22d65b Mon Sep 17 00:00:00 2001 From: Francois Keith <francois.keith@gmail.com> Date: Thu, 14 Apr 2011 18:49:51 +0200 Subject: [PATCH] Win32: correct the library load --- src/interpreter.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/interpreter.cc b/src/interpreter.cc index 5cb34ba..b638e0c 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_); -- GitLab