Menu

#2 Error on build (macOS only?)

v1.0_(example)
open
nobody
None
5
2023-08-23
2023-08-23
No

Buiding on macOS with wxWidget installed via Homebrew I see two errors and several warnings when building v0.4. After a make clean I see this:

steven@Stevens-Laptop kmap % make
g++  -M `wx-config --cxxflags` -Wall -pipe  truthtable.cpp > truthtable.d
g++  -M `wx-config --cxxflags` -Wall -pipe  truthtable.cpp | sed s/\\.o/.d/ > truthtable.d
g++  -M `wx-config --cxxflags` -Wall -pipe  kmap.cpp > kmap.d
g++  -M `wx-config --cxxflags` -Wall -pipe  kmap.cpp | sed s/\\.o/.d/ > kmap.d
g++  -M `wx-config --cxxflags` -Wall -pipe  karnaughmap.cpp > karnaughmap.d
g++  -M `wx-config --cxxflags` -Wall -pipe  karnaughmap.cpp | sed s/\\.o/.d/ > karnaughmap.d
g++  -M `wx-config --cxxflags` -Wall -pipe  blamframe.cpp > blamframe.d
g++  -M `wx-config --cxxflags` -Wall -pipe  blamframe.cpp | sed s/\\.o/.d/ > blamframe.d
g++  -M `wx-config --cxxflags` -Wall -pipe  blam.cpp > blam.d
g++  -M `wx-config --cxxflags` -Wall -pipe  blam.cpp | sed s/\\.o/.d/ > blam.d
g++  -c `wx-config --cxxflags` -Wall -pipe  -o blam.o blam.cpp
In file included from blam.cpp:1:
In file included from /opt/homebrew/include/wx-3.2/wx/wx.h:24:
In file included from /opt/homebrew/include/wx-3.2/wx/event.h:22:
In file included from /opt/homebrew/include/wx-3.2/wx/cursor.h:75:
/opt/homebrew/include/wx-3.2/wx/utils.h:749:35: warning: default member initializer for non-static data member is a C++11 extension [-Wc++11-extensions]
    wxEventLoop* m_modalEventLoop = NULL;
                                  ^
In file included from blam.cpp:5:
./blamframe.h:21:71: error: redefinition of parameter 'pos'
                blamFrame( const wxString& title, const wxPoint& pos, const wxSize& pos, wxLocale& locale );
                                                                                    ^
./blamframe.h:21:52: note: previous declaration is here
                blamFrame( const wxString& title, const wxPoint& pos, const wxSize& pos, wxLocale& locale );
                                                                 ^
./blamframe.h:18:7: warning: class 'blamFrame' does not declare any constructor to initialize its non-modifiable members
class blamFrame : public wxFrame
      ^
./blamframe.h:45:13: note: reference member 'm_locale' will never be initialized
                wxLocale& m_locale;
                          ^
blam.cpp:31:25: error: no matching constructor for initialization of 'blamFrame'
        blamFrame *frame = new blamFrame( _( "Karnaugh Map Minimizer" ), wxDefaultPosition, wxSize(450,700), m_locale );
                               ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./blamframe.h:18:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were provided
class blamFrame : public wxFrame
      ^
./blamframe.h:18:7: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 4 were provided
2 warnings and 2 errors generated.
make: *** [blam.o] Error 1

Discussion


Log in to post a comment.

MongoDB Logo MongoDB