> I was just building version 3.1.0 and ran into some problems in DOScreen.cpp. Basically the conversions from
> char* to wxString were generating "ambiguous overload" errors (in gcc 4.4.3, wx-2.8)
>
> The simple fix is given in the following diff output.
Today, I ran into the same problem and was happy to find your fix. I've incorporated it into a unified diff file,
that can easily be applied with the patch program by saving it into a file ('drsosc-3.1.0-wxfix.patch', say), and
in the drs-3.1.0 directory running:
patch -1 < drsosc-3.1.0-wxfix.patch
This is the file:
--- src/DOScreen.cpp.orig 2011-12-09 15:49:48.682201902 +0100
+++ src/DOScreen.cpp 2011-12-09 15:51:45.666000111 +0100
@@ -234,7 +234,7 @@ void DOScreen::DrawWaveform(wxDC& dc, wx
// display optional debug messages
if (*m_frame->GetOsci()->GetDebugMsg()) {
- wxst = m_frame->GetOsci()->GetDebugMsg();
+ wxst = wxString(m_frame->GetOsci()->GetDebugMsg(),wxConvUTF8);
dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID));
dc.SetBrush(*wxGREEN);
dc.SetTextForeground(*wxBLACK);
@@ -243,7 +243,7 @@ void DOScreen::DrawWaveform(wxDC& dc, wx
dc.DrawText(wxst, m_x1+4, m_y1+2);
}
if (m_debugMsg[0]) {
- wxst = m_debugMsg;
+ wxst = wxString(m_debugMsg,wxConvUTF8);
dc.SetPen(wxPen(*wxLIGHT_GREY, 1, wxSOLID));
dc.SetBrush(*wxGREEN);
dc.SetTextForeground(*wxBLACK);
@@ -474,9 +474,9 @@ void DOScreen::DrawWaveform(wxDC& dc, wx
if (m_osci->GetNumberOfBoards() && m_osci->IsIdle()) {
dc.SetTextForeground(*wxGREEN);
if (m_osci->GetTriggerMode() == TM_AUTO)
- wxst = "AUTO";
+ wxst = wxString("AUTO",wxConvUTF8);
else
- wxst = "TRIG?";
+ wxst = wxString("TRIG?",wxConvUTF8);
dc.GetTextExtent(wxst, &w, &h);
dc.DrawText(wxst, m_x2 - w - 2, m_y1 + 1);
} |