PB wrote: ↑Fri Apr 09, 2021 6:30 pm
(I know nothing about wxMathPlot)
What exactly is the issue with wxMathPlot and recent wxWidgets versions?
I have just tried to find the version on GitHub with most recent commit, ended with this:
https://github.com/mkarmona/wxMathPlot
I could build the library as well as build and run samples just fine (wxWidgets master, MSVS 2019 64-bit):
mathplot.png
One gets many warning due to using deprecated API but it still builds... However, there may be some issues aside from build errors?
I tried to build this library using MinGW, please find the command in the picture below.
To compile I create a wxWidgets3.1.0 empty project static library or dynamic library, and I add the .cpp and .h files.
I tried with the repository GitHub you attached in your response.
Code: Select all
-------------- Build: Debug in testPloter (compiler: GNU GCC Compiler)---------------
g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -g -IC:\wxWidgets-3.1.4\include -IC:\wxWidgets-3.1.4\lib\gcc_dll\mswu -c C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp -o obj\Debug\mathplot.o
g++.exe -shared -Wl,--output-def=bin\Debug\libtestPloter.def -Wl,--dll -LC:\wxWidgets-3.1.4\lib\gcc_dll obj\Debug\mathplot.o -o bin\Debug\testPloter.dll -mthreads -lwxmsw31u C:\wxWidgets-3.1.4\lib\gcc_dll\libwxbase31ud.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxbase31ud_net.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxbase31ud_xml.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxexpat.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxexpatd.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxjpeg.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxjpegd.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31u.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31u_gl.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_adv.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_aui.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_core.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_gl.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_html.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_media.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_propgrid.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_ribbon.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_richtext.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_stc.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_webview.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxmsw31ud_xrc.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxpng.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxpngd.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxregexu.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxregexud.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxscintilla.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxscintillad.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxtiff.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxtiffd.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxzlib.a C:\wxWidgets-3.1.4\lib\gcc_dll\libwxzlibd.a
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'wxBitmap mpLayer::GetColourSquare(int)':
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:81:32: warning: 'wxBrush::wxBrush(const wxColour&, int)' is deprecated: use wxBRUSHSTYLE_XXX constants [-Wdeprecated-declarations]
wxBrush brush(filler, wxSOLID);
^
In file included from C:\wxWidgets-3.1.4\include/wx/brush.h:73:0,
from C:\wxWidgets-3.1.4\include/wx/dc.h:24,
from C:\wxWidgets-3.1.4\include/wx/dcmemory.h:14,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:84,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/brush.h:44:5: note: declared here
wxBrush(const wxColour& col, int style);
^~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'virtual void mpScaleX::Plot(wxDC&, mpWindow&)':
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:806:31: warning: 'void wxPen::SetStyle(int)' is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations]
m_pen.SetStyle(wxDOT);
^
In file included from C:\wxWidgets-3.1.4\include/wx/pen.h:84:0,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:83,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/pen.h:62:10: note: declared here
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
^~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:817:33: warning: 'void wxPen::SetStyle(int)' is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations]
m_pen.SetStyle(wxSOLID);
^
In file included from C:\wxWidgets-3.1.4\include/wx/pen.h:84:0,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:83,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/pen.h:62:10: note: declared here
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
^~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'virtual void mpScaleY::Plot(wxDC&, mpWindow&)':
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:1068:31: warning: 'void wxPen::SetStyle(int)' is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations]
m_pen.SetStyle(wxDOT);
^
In file included from C:\wxWidgets-3.1.4\include/wx/pen.h:84:0,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:83,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/pen.h:62:10: note: declared here
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
^~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:1079:33: warning: 'void wxPen::SetStyle(int)' is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations]
m_pen.SetStyle(wxSOLID);
^
In file included from C:\wxWidgets-3.1.4\include/wx/pen.h:84:0,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:83,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/pen.h:62:10: note: declared here
void SetStyle(int style) { SetStyle((wxPenStyle)style); }
^~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpWindow::OnMouseMove(wxMouseEvent&)':
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:1327:37: warning: 'wxPen::wxPen(const wxColour&, int, int)' is deprecated: use wxPENSTYLE_XXX constants [-Wdeprecated-declarations]
wxPen pen(*wxBLACK, 1, wxDOT);
^
In file included from C:\wxWidgets-3.1.4\include/wx/pen.h:84:0,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:83,
from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:
C:\wxWidgets-3.1.4\include/wx/msw/pen.h:59:5: note: declared here
wxPen(const wxColour& col, int width, int style);
^~~~~
In file included from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:24:0:
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpFXYVector::SetData(const std::vector<double>&, const std::vector<double>&)':
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2414:5: note: in expansion of macro 'wxLogError'
wxLogError(
^
In file included from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:17:0:
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h: In constructor 'mpPrintout::mpPrintout(mpWindow*, const wxChar*)':
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.h:1550:13: warning: 'mpPrintout::plotWindow' will be initialized after [-Wreorder]
mpWindow *plotWindow;
^~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2515:21: warning: base 'wxPrintout' [-Wreorder]
wxPrintout(title) { }
^
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2512:1: warning: when initialized here [-Wreorder]
mpPrintout::mpPrintout(mpWindow *drawWindow, const wxChar *title)
^~~~~~~~~~
In file included from C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:24:0:
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpMovableObject::ShapeUpdated()':
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2592:5: note: in expansion of macro 'wxLogError'
wxLogError(wxT("[mpMovableObject::ShapeUpdated] Error, m_shape_xs and \
^
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpCovarianceEllipse::RecalculateShape()':
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2714:5: note: in expansion of macro 'wxLogError'
wxLogError(
^
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2719:5: note: in expansion of macro 'wxLogError'
wxLogError(
^
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2724:5: note: in expansion of macro 'wxLogError'
wxLogError(
^
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2740:5: note: in expansion of macro 'wxLogError'
wxLogError(
^
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpPolygon::setPoints(const std::vector<double>&, const std::vector<double>&, bool)':
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2816:5: note: in expansion of macro 'wxLogError'
wxLogError(wxT("[mpPolygon] Error: points_xs and points_ys must have the "
^
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp: In member function 'void mpBitmapLayer::SetBitmap(const wxImage&, double, double, double, double)':
C:\wxWidgets-3.1.4\include/wx/log.h:1261:36: error: 'wxDO_IF' was not declared in this scope
wxDO_IF(wxLOG_IS_ENABLED(level)) \
^
C:\wxWidgets-3.1.4\include/wx/log.h:1273:20: note: in expansion of macro 'wxDO_LOG_IF_ENABLED'
#define wxLogError wxDO_LOG_IF_ENABLED(Error)
^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Code_Blocks\testPloter\mathplot.cpp:2842:5: note: in expansion of macro 'wxLogError'
wxLogError(wxT("[mpBitmapLayer] Assigned bitmap is not Ok()!"));