Undeclared stuff when C++ compiling

MMEX4Desktop, incl. Windows, macOS (10.10 or newer), and Most Unix variants using the GTK+ toolkit

Moderator: Renato

Post Reply
juricb
New MMEX User
Posts: 3
Joined: Wed Jul 18, 2018 4:48 pm
Are you a spam bot?: No

Undeclared stuff when C++ compiling

Post by juricb »

After having cloned mmex source from branch master, as described in BUILD.d, I'm trying to build it on OpenSuse 15.2.
When it's finally time for c++ compiling, I can't see why I run into several symbols not declared, as if some .h files weren't included.
E.g.

Code: Select all

In file included from moneymanagerex/src/mmreportspanel.h:23:0, from moneymanagerex/src/mmpanelbase.cpp:24:
moneymanagerex/src/mmhelppanel.h:60:22: error: wxWebViewEvent’ has not been declared void OnNewWindow(wxWebViewEvent& evt);
but also:

Code: Select all

  moneymanagerex/src/mmpanelbase.cpp:245:41: error: incomplete type ‘wxWebView’ used in nested name specifier
     wxWebView * htmlWindow = wxWebView::New(this, wxID_ANY);
                                         ^~~
  moneymanagerex/src/mmpanelbase.cpp:246:15: error: invalid use of incomplete type ‘class wxWebView’
     htmlWindow->SetPage(BuildPage(), "");
               ^~
In file included from moneymanagerex/src/mmreportspanel.h:23:0,
                 from moneymanagerex/src/mmpanelbase.cpp:24:
  moneymanagerex/src/mmhelppanel.h:26:7: note: forward declaration of ‘class wxWebView’
 class wxWebView;
       ^~~~~~~~~
... and many others

Any help is appreciated.
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Undeclared stuff when C++ compiling

Post by Nikolay »

juricb
New MMEX User
Posts: 3
Joined: Wed Jul 18, 2018 4:48 pm
Are you a spam bot?: No

Re: Undeclared stuff when C++ compiling

Post by juricb »

Thank you for your reply

After having read the thread you linked, I thought that I've found the issue: I didn't configured wx make with option --enable-webview, so I made again wx including it:

Code: Select all

../configure --disable-shared --enable-webview --enable-cxx11 --with-cxx=11 --without-libtiff --enable-universal-binary=arm64,x86_64
No way. The compilation of MMEX still stops at:

Code: Select all

Building CXX object src/CMakeFiles/mmex.dir/general_report_manager.cpp.o
by saying:

Code: Select all

In file included from moneymanagerex/src/general_report_manager.cpp:21:0:
moneymanagerex/src/general_report_manager.h:105:22: error: ‘wxWebViewEvent’ has not been declared
     void OnNewWindow(wxWebViewEvent& evt);
                      ^~~~~~~~~~~~~~
moneymanagerex/src/general_report_manager.h:110:5: error: ‘wxWebView’ does not name a type; did you mean ‘wxListView’?
     wxWebView* browser_;
     ^~~~~~~~~
     wxListView
an many more errors.

It seems that symbol wxUSE_WEBVIEW, needed to actually include declarations from file wx/webview.h is not defined when file general_report_manager.h is included from general_report_manager.cpp.

The symbol wxUSE_WEBVIEW is defined in wxWidgets/wxWidgets-3.1.5/include/wx/wx/setup.h and it's indirectly included into general_report_manager.cpp, but not before general_report_manager.h.

Thanks again.
PMaff
Super MMEX User
Posts: 73
Joined: Sun Aug 11, 2019 1:57 pm
Are you a spam bot?: No

Re: Undeclared stuff when C++ compiling

Post by PMaff »

juricb wrote: Tue Dec 28, 2021 9:38 pm Thank you for your reply

After having read the thread you linked, I thought that I've found the issue: I didn't configured wx make with option --enable-webview, so I made again wx including it:

Code: Select all

../configure --disable-shared --enable-webview --enable-cxx11 --with-cxx=11 --without-libtiff --enable-universal-binary=arm64,x86_64
No way. The compilation of MMEX still stops at:

[...]



The symbol wxUSE_WEBVIEW is defined in wxWidgets/wxWidgets-3.1.5/include/wx/wx/setup.h and it's indirectly included into general_report_manager.cpp, but not before general_report_manager.h.

Thanks again.
I had similar errors in SuSE Leap 15.2 .

I was just looking through my kind of logfile, when I compiled wxWidget on SuSE Leap 15.2 :
These are the settings that I noted there:
[...]/wxWidgets-3.1.5/gtk-build>
../configure
--disable-shared
--enable-cxx11
--with-cxx=11
--without-libtiff
--enable-webview
--with-gtk=3
--enable-unicode
--enable-intl
--enable-webviewwebkit

With that wxWidget 3.1.5 I was able to compile as far as I remember all mmex from 1.5.4-Beta.1 till 1.5.11 stable on SuSE.
Did not try the latest 1.5.12 stable or the 1.5.13 beta on SuSE.

Edit: just compiled mmex stable 1.5.12 also on OpenSuSE Leap 15.2 .
whall3y
MMEX Developer
Posts: 342
Joined: Fri Aug 21, 2020 5:44 pm
Are you a spam bot?: No

Re: Undeclared stuff when C++ compiling

Post by whall3y »

Post Reply