/* static */
void wxDynamicLibrary::Error()
{
-#if wxUSE_UNICODE
- wxWCharBuffer buffer = wxConvLocal.cMB2WC( dlerror() );
- const wxChar *err = buffer;
-#else
- const wxChar *err = dlerror();
-#endif
+ wxString err(dlerror());
+
+ if ( err.empty() )
+ err = _("Unknown dynamic library error");
- wxLogError(wxT("%s"), err ? err : _("Unknown dynamic library error"));
+ wxLogError(wxT("%s"), err);
}
#endif // wxHAVE_DYNLIB_ERROR