简体   繁体   English

将wxMathplot与code :: blocks一起使用

[英]Using wxMathplot with code::blocks

I am using Code::Blocks with wxWidgets. 我在wxWidgets中使用Code :: Blocks。 In general I have a problem similar to that described here . 总的来说,我有一个与这里描述的问题类似的问题。 Ok so I copy the mathplot.h and mathplot.cpp in the project directory, add those files to the project and do #include mathplot.h in all automatically generated (not empty project) wxWidgets cpp files. 好的,所以我将mathplot.hmathplot.cpp复制到项目目录中,将这些文件添加到项目中,并在所有自动生成的(非空项目)wxWidgets cpp文件中执行#include mathplot.h Nevertheless when I try to compile it gives me the error: 但是,当我尝试编译时,出现了以下错误:

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

How to manage this issue and to finally use wxMathPlot in code::blocks? 如何解决这个问题并最终在代码:: blocks中使用wxMathPlot?

This is the compiler log relevant to the error: 这是与错误相关的编译器日志:

/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);

mpWindow::SaveScreenshot() no longer works. mpWindow :: SaveScreenshot()不再起作用。 Since I do not use the feature, I simply commented out the final line 由于我没有使用该功能,因此我仅在最后一行注释掉了

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

This allowed my projects to compile and use the other features. 这使我的项目可以编译和使用其他功能。

It seems that you are using a version of wxMathPlot that has not been maintained for a long time. 似乎您使用的是长时间未维护的wxMathPlot版本。 Perhaps you should try downloading the version on github which looks to be more recent and see how you get on with that. 也许您应该尝试在github上下载该版本,该版本看起来较新,然后查看如何继续进行下去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM