BundleUtilities: Print reason for not loading module.so

This commit is contained in:
Clinton Stimpson 2011-06-01 10:59:34 -06:00
parent f3de459cec
commit 8064044c94
1 changed files with 8 additions and 4 deletions

View File

@ -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;
}