wxMathPlot compiling on Linux

Help
Francesco
2006-10-19
2013-05-02
  • Francesco

    Francesco - 2006-10-19

    I have develop a little application on WxDevC++ on windows in order to learn to use wxwidget.
    In this application I use wxMathPlot
    http://wxmathplot.sourceforge.net/
    and in order to not use wxmathplot like library I
    include the mathplot.cpp and mathplot.h in my source .

    In windows with wxDev-C++ I don't have any problem but when I try to compile on Linux
    with Code::Blocks I receive many errors .
    Help , where mistake?

    The same things appen if I try to make a project in code::bloks that have as source the
    mathplot.cpp
    mathplot.h
    and the demo source of mathplot mp1.cpp

    Below some errors that I receive

    =================================================
    -------------- Build: Debug in Plotta ---------------
    g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c wx_pch.h -o wx_pch.h.gch/Debug_wx_pch.h.gch
    g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c mathplot.cpp -o obj/Debug/mathplot.o
    g++ `wx-config --cflags` -Winvalid-pch -include wx_pch.h -DUSE_PCH -Wall -g  -I/usr/include  -c mp1.cpp -o obj/Debug/mp1.o
    g++ -L/usr/lib  -o bin/Debug/Plotta obj/Debug/mathplot.o obj/Debug/mp1.o   `wx-config --libs` 
    obj/Debug/mathplot.o: In function `mpWindow::OnCenter(wxCommandEvent&)':/home/francesco/Progetti/Plotta/mathplot.cpp:480: undefined reference to `mpWindow::SetPos(double, double)'
    obj/Debug/mathplot.o: In function `mpWindow::OnScroll2(wxScrollWinEvent&)':/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::GetScaleX() const'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::GetScaleX() const'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:542: undefined reference to `mpWindow::SetPosX(double)'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::GetScaleY() const'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::GetScaleY() const'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:546: undefined reference to `mpWindow::SetPosY(double)'
    obj/Debug/mathplot.o: In function `mpWindow::UpdateAll()':/home/francesco/Progetti/Plotta/mathplot.cpp:588: undefined reference to `mpWindow::GetScaleX() const'
    ..............
    ..............
    :/home/francesco/Progetti/Plotta/mathplot.cpp:194: undefined reference to `mpWindow::GetScrX() const'
    :/home/francesco/Progetti/Plotta/mathplot.cpp:195: undefined reference to `mpWindow::GetScrY() const'
    obj/Debug/mathplot.o: In function `mpFY::Plot(wxDC&, mpWindow&)':/home/francesco/Progetti/Plotta/mathplot.cpp:117: undefined reference to `mpWindow::GetScrY() const'
    Process terminated with status 1 (0 minutes, 6 seconds)
    50 errors, 0 warnings

    How I must modify mathplot to compile on LINUX ?

    Thanks

     
    • cdron77

      cdron77 - 2007-06-14

      I reply to your post with extreme late, but I'm the new admin by few days, so I hope it can help anyway.

      I guess your problem could be related to a bug present in the 0.01 version of mathplot: an include was erroneous. Try using new 0.02 version and tell me about.

       

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

Sign up for the SourceForge newsletter:





No, thanks