comparison vampy-main.cpp @ 34:c905122f79e7 vampy2

* Fixes from OpenSolaris build
author cannam
date Wed, 23 Sep 2009 12:07:32 +0000
parents 4f1894c7591b
children
comparison
equal deleted inserted replaced
33:c4da8d559872 34:c905122f79e7
76 static bool haveScannedPlugins = false; 76 static bool haveScannedPlugins = false;
77 static bool haveVampyInitialised = false; 77 static bool haveVampyInitialised = false;
78 78
79 static bool tryPreload(string name) 79 static bool tryPreload(string name)
80 { 80 {
81 cerr << "Trying to load Python interpreter library \"" << name << "\"...";
82 #ifdef _WIN32 81 #ifdef _WIN32
83 void *lib = LoadLibrary(name.c_str()); 82 void *lib = LoadLibrary(name.c_str());
84 if (!lib) { 83 if (!lib) {
85 cerr << " failed" << endl;
86 return false; 84 return false;
87 } 85 }
88 #else 86 #else
89 void *lib = dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL); 87 void *lib = dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL);
90 if (!lib) { 88 if (!lib) {
91 cerr << " failed" << endl;
92 return false; 89 return false;
93 } 90 }
94 #endif 91 #endif
95 cerr << " succeeded" << endl;
96 return true; 92 return true;
97 } 93 }
98 94
99 static bool preloadPython() 95 static bool preloadPython()
100 { 96 {