代码之家  ›  专栏  ›  技术社区  ›  Pekov

将wxMathplot与代码::块一起使用

  •  1
  • Pekov  · 技术社区  · 7 年前

    我在wxWidgets中使用代码::块。一般来说,我有一个类似于所描述的问题 here . 好的,我复制 mathplot.h mathplot.cpp #include mathplot.h

    /usr/include/wx-3.1-unofficial/wx/string.h|303|error: ‘wxString::wxString(int)’ is private|
    

    如何管理这个问题并最终在代码::块中使用wxMathPlot?

    /usr/include/wx-3.1-unofficial/wx/string.h: In member function ‘bool mpWindow::SaveScreenshot(const wxString&, int, wxSize, bool)’:
    
    /usr/include/wx-3.1-unofficial/wx/string.h:303:3: error: ‘wxString::wxString(int)’ is private
       wxString(int); 
    
    /home/pekov/Workshop/Code::Blocks/tester/mathplot.cpp:2239:47: error: within this context
         return screenImage.SaveFile(filename, type);
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   ravenspoint    7 年前

    mpWindow::SaveScreenshot()不再工作。由于我没有使用该功能,我只是注释掉了最后一行

    //    return screenImage.SaveFile(filename, type);
    

    这使我的项目能够编译和使用其他功能。

    看起来您使用的wxMathPlot版本已经很长时间没有维护了。也许你应该试着下载 the version on github

    推荐文章