patch 8.2.3208: dynamic library load error does not mention why it failed
Problem: Dynamic library load error does not mention why it failed.
Solution: Add the error message. (Martin Tournoij, closes #8621)
diff --git a/src/if_python3.c b/src/if_python3.c
index c7db9d7..4944ab8 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -125,10 +125,12 @@
# endif
# define close_dll dlclose
# define symbol_from_dll dlsym
+# define load_dll_error dlerror
# else
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
+# define load_dll_error GetWin32Error
# endif
/*
* Wrapper defines
@@ -795,7 +797,7 @@
if (!hinstPy3)
{
if (verbose)
- semsg(_(e_loadlib), libname);
+ semsg(_(e_loadlib), libname, load_dll_error());
return FAIL;
}