From 8064044c94a7ed8e4b8a699a730ebab1aafd925b Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Wed, 1 Jun 2011 10:59:34 -0600 Subject: [PATCH] BundleUtilities: Print reason for not loading module.so --- Tests/BundleUtilities/testbundleutils.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Tests/BundleUtilities/testbundleutils.cpp b/Tests/BundleUtilities/testbundleutils.cpp index 87eaae358..77fe4b060 100644 --- a/Tests/BundleUtilities/testbundleutils.cpp +++ b/Tests/BundleUtilities/testbundleutils.cpp @@ -16,14 +16,18 @@ int main(int, char**) #if defined(WIN32) HANDLE lib = LoadLibraryA("module.dll"); -#else - void* lib = dlopen("module.so", RTLD_LAZY); -#endif - if(!lib) { printf("Failed to open module\n"); } +#else + void* lib = dlopen("module.so", RTLD_LAZY); + if(!lib) + { + printf("Failed to open module\n%s\n", dlerror()); + } +#endif + return lib == 0 ? 1 : 0; }