Hi David, To use rand_s you need to start your source file with:
#define _CRT_RAND_S #include <stdlib.h> It is crucial that these lines precede all your other includes, because other headers may already have dragged in stdlib.h Best, Tom > On 17 Oct 2019, at 19:03, David Bergman <stuntguitar1...@gmail.com> wrote: > > All, > > I am in the process of trying to set up wxWidgets and plplot for development > using code::blocks with mingw on a Windows 10 machine. > I previously had a configuration working on a Windows 8 machine with VS 2017 > but that machine is deceased. > wxWidgets installed fairly easily with no issues reported and everything > looks good (though I have not run any test examples yet). > > The PLplot build ran and connected to wxWidgets (found it and finished > reporting it as being ON). Running ming32-make at the command prompt I > eventually get a failure at 79% with the following error message (cut and > pasted at end of message). I am using wxWidgets-3.1.2 and PLplot-5.15.0. I > followed the commands for installing using mingw32-make that can be found on > the wiki for each product. > > I have reached out to the plplot group but I'm also asking wxwidgets to look > at the output since the error message mentions files included from the > wxwidgets include dir. So it is not clear, to me, if the error is related > solely to plplot or also to widgets. Before building plplot I defined > WXWIN=<path to wxwidgets folder> and included the dll dir, <>\lib\gcc_dll, in > the PATH. My assumption is that I have misunderstood something but I cannot > figure it out. My new build/install in a new Windows 8 machine with VS 2017 > seems to work but apps crash upon closing and that has not been easy to track > down either. Thank you in advance for your help. > > David > > > [ 79%] Building CXX object > drivers/CMakeFiles/wxwidgets.dir/wxwidgets_dev.cpp.obj > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp: In constructor > 'Rand::Rand()': > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:647:25: error: 'rand_s' > was not declared in this scope > rand_s( &m_seed ); > ^ > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp: In member function 'void > Font::createFont()': > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:736:101: warning: > 'wxFont::wxFont(int, int, int, int, bool, const wxString&, wxFontEncoding)' > is deprecated: use wxFONT{FAMILY,STYLE,WEIGHT}_XXX constants ie: > wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD > [-Wdeprecated-declarations] > m_font = wxFont( pt, family, style, weight, m_underlined, wxEmptyString, > wxFONTENCODING_DEFAULT ); > ^ > In file included from C:/temp/src/wxWidgets-3.1.2/include/wx/font.h:652:0, > from C:/temp/src/wxWidgets-3.1.2/include/wx/window.h:23, > from C:/temp/src/wxWidgets-3.1.2/include/wx/wx.h:38, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets.h:32, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:44: > C:/temp/src/wxWidgets-3.1.2/include/wx/msw/font.h:124:5: note: declared here > wxFont(int size, > ^ > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp: In member function > 'virtual void wxPLDevice::FillPolygon(PLStream*)': > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:1010:58: warning: > 'wxPen::wxPen(const wxColour&, int, int)' is deprecated: use wxPENSTYLE_XXX > constants [-Wdeprecated-declarations] > wxPen edgePen( m_brush.GetColour(), m_scale, wxSOLID ); > ^ > In file included from C:/temp/src/wxWidgets-3.1.2/include/wx/pen.h:84:0, > from C:/temp/src/wxWidgets-3.1.2/include/wx/dc.h:25, > from C:/temp/src/wxWidgets-3.1.2/include/wx/wx.h:50, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets.h:32, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:44: > C:/temp/src/wxWidgets-3.1.2/include/wx/msw/pen.h:59:5: note: declared here > wxPen(const wxColour& col, int width, int style); > ^ > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp: In member function > 'virtual void wxPLDevice::SetWidth(PLStream*)': > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:1046:53: warning: > 'wxPen::wxPen(const wxColour&, int, int)' is deprecated: use wxPENSTYLE_XXX > constants [-Wdeprecated-declarations] > pls->curcolor.a * 255 ), width, wxSOLID ); > ^ > In file included from C:/temp/src/wxWidgets-3.1.2/include/wx/pen.h:84:0, > from C:/temp/src/wxWidgets-3.1.2/include/wx/dc.h:25, > from C:/temp/src/wxWidgets-3.1.2/include/wx/wx.h:50, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets.h:32, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:44: > C:/temp/src/wxWidgets-3.1.2/include/wx/msw/pen.h:59:5: note: declared here > wxPen(const wxColour& col, int width, int style); > ^ > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp: In member function > 'virtual void wxPLDevice::SetColor(PLStream*)': > C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:1059:53: warning: > 'wxPen::wxPen(const wxColour&, int, int)' is deprecated: use wxPENSTYLE_XXX > constants [-Wdeprecated-declarations] > pls->curcolor.a * 255 ), width, wxSOLID ); > ^ > In file included from C:/temp/src/wxWidgets-3.1.2/include/wx/pen.h:84:0, > from C:/temp/src/wxWidgets-3.1.2/include/wx/dc.h:25, > from C:/temp/src/wxWidgets-3.1.2/include/wx/wx.h:50, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets.h:32, > from C:\temp\src\plplot-5.15.0\drivers\wxwidgets_dev.cpp:44: > C:/temp/src/wxWidgets-3.1.2/include/wx/msw/pen.h:59:5: note: declared here > wxPen(const wxColour& col, int width, int style); > ^ > drivers\CMakeFiles\wxwidgets.dir\build.make:90: recipe for target > 'drivers/CMakeFiles/wxwidgets.dir/wxwidgets_dev.cpp.obj' failed > mingw32-make[2]: *** [drivers/CMakeFiles/wxwidgets.dir/wxwidgets_dev.cpp.obj] > Error 1 > CMakeFiles\Makefile2:1410: recipe for target > 'drivers/CMakeFiles/wxwidgets.dir/all' failed > mingw32-make[1]: *** [drivers/CMakeFiles/wxwidgets.dir/all] Error 2 > Makefile:150: recipe for target 'all' failed > mingw32-make: *** [all] Error 2 > > C:\temp\src\plplot-5.15.0\buildmingw> > > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > > > _______________________________________________ > Plplot-general mailing list > Plplot-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/plplot-general
_______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general