Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved No c++11 support for Android

    Mobile and Embedded
    android c++11 library
    8
    15
    5569
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JaTe last edited by

      I've updated my question, as it seems to be c++11 support more than include problems.

      1 Reply Last reply Reply Quote 0
      • G
        Gourmet last edited by

        Use Linux workstation with complete GNU CPP compiler instead of castrated Windows MinGW - and you will get full C++11 support. I do that just like that exactly. It is much more comfortable develop and debug Android apps on Linux rather than on Windows. Cause Android itself is Linux by nature...

        jsulm 1 Reply Last reply Reply Quote 2
        • jsulm
          jsulm Lifetime Qt Champion @Gourmet last edited by

          @Gourmet He is building for Android using the official compiler from NDK I guess, not MinGW.
          And why do you think MinGW is "castrated"? It is simply GCC ported to Windows.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • J
            john6655 Banned last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • E
              Eeli K last edited by

              Does anyone have a real solution for this, not strings but the whole bunch? I don't know the details, but I have an app which I naively developed only with the Desktop kit and it should really work in Android. Do I have to spend a couple of days to refactor to C++98?

              Library problems:

              C:\Users\Eeli\Documents\Kaiku\panelsdata.cpp:149: error: 'class std::initializer_list<std::vector<_WALL_PANEL> >' has no member named 'erase'
              

              But also non-library:

              //code
              for (WALL_PANEL& p: panels) {
                      p.Zpos++;
              
              C:\Users\Eeli\Documents\Kaiku\panelsdata.cpp:158: error: 'const class std::vector<_WALL_PANEL>' has no member named 'Zpos'
                       p.Zpos++;
                         ^
              

              And about 10 others in just 1 file. This all compiles and runs fine with Creator 4.7.1 and Qt 5.11.2 with the default Desktop Kit on Windows.

              So, really, no GCC 5.3 or C++11 for Android?

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @Eeli K last edited by

                @Eeli-K What type is WALL_PANEL?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                E 1 Reply Last reply Reply Quote 0
                • sierdzio
                  sierdzio Moderators last edited by

                  Here's a possible hack around it: https://forum.qt.io/topic/38949/stl-on-android

                  Another possibility: https://github.com/nlohmann/json/issues/219#issuecomment-221686166

                  Or wait for Qt 5.12 which switches to clang on Android, and supports much more modern c++.

                  (Z(:^

                  1 Reply Last reply Reply Quote 1
                  • E
                    Eeli K @jsulm last edited by

                    @jsulm It's just a simple struct with byte-long fields.

                    @sierdzio Good news about 5.12, but the prototype must be ready tomorrow :) I'll see the hacks and maybe try 5.12 beta.

                    1 Reply Last reply Reply Quote 0
                    • E
                      Eeli K last edited by

                      I got apk package done with Qt 5.12b and Linux. Windows gives me problems. I'll start another thread for it because it's not directly related.

                      E 1 Reply Last reply Reply Quote 0
                      • E
                        Eeli K @Eeli K last edited by

                        No need for another thread, I got it working. Here are the android related package versions which finally made it to work in case someone else has troubles:
                        0_1540840385190_4fa02fd1-7668-4c41-a244-2537d0fb3016-image.png

                        The latest JDK and NDK didn't work.

                        I hope they fix the name strings for the next beta. It's annoying and confusing to have "GCC" everywhere even though it really uses clang.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post