X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0c4316ebd9fd30c72f2cc72fab75772fe7c52c3..3df485fd5b5474a059fa1467e05cf38a92928a86:/src/msw/debughlp.cpp

diff --git a/src/msw/debughlp.cpp b/src/msw/debughlp.cpp
index 0f72ce897c..3fd7b88a4b 100644
--- a/src/msw/debughlp.cpp
+++ b/src/msw/debughlp.cpp
@@ -25,7 +25,7 @@
 
 #include "wx/msw/debughlp.h"
 
-#if wxUSE_DBGHELP
+#if wxUSE_DBGHELP && wxUSE_DYNLIB_CLASS
 
 // ----------------------------------------------------------------------------
 // constants
@@ -145,7 +145,7 @@ const wxString& wxDbgHelpDLL::GetErrorMessage()
 void wxDbgHelpDLL::LogError(const wxChar *func)
 {
     ::OutputDebugString(wxString::Format(_T("dbghelp: %s() failed: %s\r\n"),
-                        func, wxSysErrorMsg(::GetLastError())));
+                        func, wxSysErrorMsg(::GetLastError())).wx_str());
 }
 
 // ----------------------------------------------------------------------------