Newbie Problem - Cant create mpWindow

  • jchan91

    jchan91 - 2011-09-14


    I am new to wxMathPlot, but I think I installed it correctly on Ubuntu 10.10 (used the PPA that cdron77 provided).

    I'm just trying to create a very simple "hello world" sort of program, but in my code, I have

    void mathTestFrame::ButtonPlot(wxCommandEvent& event)
        mpWindow* myPlot = new mpWindow(this, -1, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER);

    but when I compile, I get the error:

    undefined reference to 'mpWindow::mpWindow(wxWindow*, int, wxPoint const&, wxSize const&, long)'

    I suspect that the definition of the constructor requires type wxWindowID instead of type int, but the documentation says that -1 is the default and I also can't find a way of generating a wxWindowID. What am I misunderstanding here?

    Thank you!

  • David

    David - 2011-09-14

    Did you #include "mathplot.h" ? If you get this at compile time that is usually the problem.

  • jchan91

    jchan91 - 2011-09-14

    Yeah, I did include mathplot.h. When I don't, it complains that mpWindow* itself is an unresolved reference, before complaining about the function.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks