Merge pull request #823 from remoe/patch-4

Debugging: Hint to debug LoadLibrary issues
This commit is contained in:
OpenSceneGraph git repository 2019-08-22 13:47:25 +01:00 committed by GitHub
commit f18dd05350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,8 @@ DynamicLibrary* DynamicLibrary::loadLibrary(const std::string& libraryName)
HANDLE handle = NULL; HANDLE handle = NULL;
OSG_DEBUG << "DynamicLibrary::try to load library \"" << libraryName << "\"" << std::endl;
std::string fullLibraryName = osgDB::findLibraryFile(libraryName); std::string fullLibraryName = osgDB::findLibraryFile(libraryName);
if (!fullLibraryName.empty()) handle = getLibraryHandle( fullLibraryName ); // try the lib we have found if (!fullLibraryName.empty()) handle = getLibraryHandle( fullLibraryName ); // try the lib we have found
else handle = getLibraryHandle( libraryName ); // haven't found a lib ourselves, see if the OS can find it simply from the library name. else handle = getLibraryHandle( libraryName ); // haven't found a lib ourselves, see if the OS can find it simply from the library name.