简体   繁体   中英

Using wxMathplot with code::blocks

I am using Code::Blocks with wxWidgets. 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. 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?

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. 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. Perhaps you should try downloading the version on github which looks to be more recent and see how you get on with that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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