Assistance cross-building Windows target

Thiago Macieira thiago at macieira.org
Fri Oct 29 11:54:11 PDT 2021


On Friday, 29 October 2021 03:58:03 PDT Steven Morlock via subsurface wrote:
> Howdy,
>   I have been trying to unsuccessfully follow guidance on how to cross-build
> the Windows client.  I am running on a OSBoxes.org Ubuntu 21.04 virtual
> machine.  I have followed as best I could the instructions in
> 'subsurface/INSTALL' and
> 'subsurface/packaging/windows/mxe-based-build.sh'.  Could someone please
> review the enclosed 'winbuild.log' and suggest where I may have gone wrong.
> Thanks,Steve

Hello Steve

statsview.h:187:21: error: missing template arguments before '(' token
  return ChartItemPtr(new T(*this, std::forward<Args>(args)...));

"missing template arguments" indicates the code is using template parameter 
deduction, which is a C++17 feature. 

statscolors.h:8:46: error: 'backgroundColor' declared as an 'inline' variable
 inline const QColor backgroundColor(Qt::white);

inline variables are a C++17 feature too.

barseries.cpp:93:14: error: expected unqualified-id before '[' token
   for (auto &[dives, label]: item.items) {
              ^

And this is the syntax for structured bindings, another C++17 feature.

Looks like your issue is that Subsurface is not being compiled as C++17. That 
means your compiler is old. Whether adding the "-std=c++17" / "-std=gnu++17" 
option would help you or not, I don't know. Recommendation: upgrade your 
MinGW's GCC.

PS: looks like Subsurface is using more C++17 features than my own code!
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering





More information about the subsurface mailing list