From 8064044c94a7ed8e4b8a699a730ebab1aafd925b Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Wed, 1 Jun 2011 10:59:34 -0600 Subject: BundleUtilities: Print reason for not loading module.so --- Tests/BundleUtilities/testbundleutils.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Tests/BundleUtilities/testbundleutils.cpp b/Tests/BundleUtilities/testbundleutils.cpp index 87eaae3..77fe4b0 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"); + 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; } -- cgit v0.12