Browse Source

dlopen: Added dlerror info if dlopen fails to open.

Бранимир Караџић 3 years ago
parent
commit
7ddf616ac9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/os.cpp

+ 3 - 1
src/os.cpp

@@ -185,7 +185,9 @@ namespace bx
 		BX_UNUSED(_filePath);
 		return NULL;
 #else
-		return ::dlopen(_filePath.getCPtr(), RTLD_LOCAL|RTLD_LAZY);
+		void* so = ::dlopen(_filePath.getCPtr(), RTLD_LOCAL|RTLD_LAZY);
+		BX_WARN(NULL != so, "dlopen failed: \"%s\".", ::dlerror() );
+		return so;
 #endif // BX_PLATFORM_
 	}