瀏覽代碼

BundleUtilities: Print reason for not loading module.so

Clinton Stimpson 14 年之前
父節點
當前提交
8064044c94
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      Tests/BundleUtilities/testbundleutils.cpp

+ 7 - 3
Tests/BundleUtilities/testbundleutils.cpp

@@ -16,14 +16,18 @@ int main(int, char**)
 
 #if defined(WIN32)
   HANDLE lib = LoadLibraryA("module.dll");
+  if(!lib)
+  {
+    printf("Failed to open module\n");
+  }
 #else
   void* lib = dlopen("module.so", RTLD_LAZY);
-#endif
-
   if(!lib)
   {
-    printf("Failed to open module\n");
+    printf("Failed to open module\n%s\n", dlerror());
   }
+#endif
+
 
   return lib == 0 ? 1 : 0;
 }