setvisible / ArrowDL

ArrowDL (Arrow Downloader) is a download manager for Windows, MacOS and Linux
https://www.arrow-dl.com/
GNU Lesser General Public License v3.0
611 stars 33 forks source link

Build issues (no match for ‘operator%’) #129

Closed axet closed 3 weeks ago

axet commented 7 months ago

Hello!

Here is a build issues on Debian 12 (Bookworm) with default qt6 installation:

When I make, I got the following:

/media/axet/128GB/local/ArrowDL/include/../src/version.h:67:73: error: no match for ‘operator%’ (operand types are ‘QString’ and ‘QLatin1StringView’ {aka ‘QLatin1String’})
   67 | const QString STR_COMPILER_WORDSIZE{QString::number(QSysInfo::WordSize) % "-bit"_L1};
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
      |                                                    |                      |
      |                                                    QString                QLatin1StringView {aka QLatin1String}

I'm not QT expert, but I know you can concatinate strings with "%" operator, but it fails for some reason. If I prelace all "%" with "+" compilation works, but failed later...

Can you clarify build dependencies / build.md page or fix build scripts?

setvisible commented 3 weeks ago

Hi,

The project is built without such issue on both Ubuntu and Windows on GithubActions (https://github.com/setvisible/ArrowDL/actions).

That is, I presume it's configuration issue on your machine;

Tips: Maybe verify the version of C++ (to use c++20 or c++24) and verify your compiler. It looks like a language issue (symbol % not recognized or not implempented by the language?). GithubActions use GCC on ubuntu and mingw on Windows. Do you use another compiler? If Clang, for instance, I can't guarantee it works. Moreover please note that C++11 is decommissioned on this project.

Good luck ;)

Regards