From 822840bd1a56e21bdeea22fee5f005d0a9e01ed5 Mon Sep 17 00:00:00 2001 From: Remo E Date: Sun, 18 Aug 2019 20:14:17 +0200 Subject: [PATCH] Debugging: Hint to debug LoadLibrary issues This helps to debug loading dynamic libraries in an environment without implemented "dlopen". For example emscripten with static compiled OSG. --- src/osgDB/DynamicLibrary.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osgDB/DynamicLibrary.cpp b/src/osgDB/DynamicLibrary.cpp index 0fe9256c6..38cce7e4a 100644 --- a/src/osgDB/DynamicLibrary.cpp +++ b/src/osgDB/DynamicLibrary.cpp @@ -77,6 +77,8 @@ DynamicLibrary* DynamicLibrary::loadLibrary(const std::string& libraryName) HANDLE handle = NULL; + OSG_DEBUG << "DynamicLibrary::try to load library \"" << libraryName << "\"" << std::endl; + std::string fullLibraryName = osgDB::findLibraryFile(libraryName); 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.