Pekov
Pekov

Reputation: 537

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

Upvotes: 1

Views: 654

Answers (1)

ravenspoint
ravenspoint

Reputation: 20492

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.

Upvotes: 2

Related Questions