How to use Mathplot in wxSmith(Code::Blocks) and wxWidgets

﹥>﹥吖頭↗ 提交于 2019-12-25 04:38:18

问题


I am using wxSmith in Code::Blocks for a GUI application. Everything is alright for creating basic wxWidgets components but I need to plot something within.

Thus, I have downloaded MathPlot, and copied both mathplot.h and mathplot.cpp to my project folder.

There is this category 'mathplot' at the wxSmith's palette (at the bottom of the editor). I have selected the 'mpWindow' component, and added #include "mathplot.h" to my main.h file for parameters declaration etc.

My problem here is I am getting the error message "undefined reference to mpWindow::mpWindow(wxWindow*, int, wxPoint const&, ...) eventhough the function is declared in 'mathplot.h' file that I have included.

I could not find any source that shows a thorough procedures or example in using MathPlot in wxSmith or wxWidget.

Thus, if anyone could help me with this, it will be much appreciated!

I am using wxWidgets 2.8.12.


回答1:


Just in case anybody is facing the same problem, this is what I have done to solve the problem. Copy both 'mathplot.cpp' and 'mathplot.h' to the project folder, and add both files to your project by selecting Project->Add files to project... in Code::Blocks.



来源:https://stackoverflow.com/questions/35761990/how-to-use-mathplot-in-wxsmithcodeblocks-and-wxwidgets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!