Skip to content
Snippets Groups Projects
Commit 3369deb1 authored by Francois Keith's avatar Francois Keith Committed by Francois Keith
Browse files

Win32: correct the library load

parent f7f73bdd
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,11 @@ Interpreter::Interpreter() ...@@ -47,7 +47,11 @@ Interpreter::Interpreter()
{ {
// load python dynamic library // load python dynamic library
// this is silly, but required to be able to import dl module. // this is silly, but required to be able to import dl module.
#ifndef WIN32
dlopen(libpython.c_str(), RTLD_LAZY | RTLD_GLOBAL); dlopen(libpython.c_str(), RTLD_LAZY | RTLD_GLOBAL);
#else
LoadLibrary(libpython.c_str());
#endif
Py_Initialize(); Py_Initialize();
mainmod_ = PyImport_AddModule("__main__"); mainmod_ = PyImport_AddModule("__main__");
Py_INCREF(mainmod_); Py_INCREF(mainmod_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment