Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Configure QtCreator in RPi3
Forum Updated to NodeBB v4.3 + New Features

Configure QtCreator in RPi3

Scheduled Pinned Locked Moved Unsolved QtonPi
compile-error
20 Posts 3 Posters 3.0k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    Pavel_47
    wrote on 5 May 2019, 20:57 last edited by
    #1

    Hello,

    I'm not sure that QtCreator is properly configured on my RPi3.
    Thus, when I launch the simplest application, the following compilation error appears:

    cannot find -lGLESv2
    collect2: error: ld returned 1 exit status.
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 May 2019, 21:08 last edited by
      #2

      Hi,

      This has nothing to do with Qt Creator. See this post on the RaspberryPi stack exchange site.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Pavel_47
        wrote on 5 May 2019, 21:28 last edited by
        #3

        If I properly understood the solution from your link, -lGLESv2 option should be changed for -lbrcmGLESv2 in the Makefile. I did it in QtCreator project Makefile.
        The problem persists.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 5 May 2019, 21:31 last edited by
          #4

          I'd check the RPi3 mkspec and change it there.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • P Offline
            P Offline
            Pavel_47
            wrote on 5 May 2019, 21:49 last edited by
            #5

            What do you mean saying "change it there". After all, when I launch project compiling, it is local Makefile (i.e. in the QtCreator project directory) that is used for compilation.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 5 May 2019, 21:54 last edited by
              #6

              Qt's various platforms configuration are stored in what is call a mkspec. These files contains the set of compiler and linker options to use. Hence go to that folder, more specifically the one called devices in which you will find the RPi3 specific mkspec.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • P Offline
                P Offline
                Pavel_47
                wrote on 5 May 2019, 22:15 last edited by
                #7

                Have you any idea where can I find this mkspec.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 6 May 2019, 20:53 last edited by
                  #8

                  Under the mkspecs folder in your Qt installation.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply 6 May 2019, 23:38
                  0
                  • S SGaist
                    6 May 2019, 20:53

                    Under the mkspecs folder in your Qt installation.

                    P Offline
                    P Offline
                    Pavel_47
                    wrote on 6 May 2019, 23:38 last edited by
                    #9

                    @SGaist
                    I installed Qt quite a while ago and don't remember how I proceeded at that time. I can identify QtCreator location using which qtcreator, but for framework it doesn't work. Do you have any idea how to find it ?
                    Thanks.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 7 May 2019, 21:29 last edited by
                      #10

                      Go to the preferences -> build and run -> Qt Versions.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        Pavel_47
                        wrote on 8 May 2019, 11:32 last edited by
                        #11

                        There is no build and run in preferences.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 8 May 2019, 11:39 last edited by
                          #12

                          It's Build & Run, but some stuff has changed, so depending on your Qt Creator version, it's under Kits.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1
                          • P Offline
                            P Offline
                            Pavel_47
                            wrote on 8 May 2019, 17:26 last edited by
                            #13

                            Well, I'm not sure I understood you correctly.
                            I've found QtCreator in Programming section of Application menu.
                            But neither section in Application menu mentions Qt framework itself.
                            The location of QtCreator executive I can check with
                            "which qtcreator" command.
                            It's located in /usr/bin. But there is no any folder named mkspec.

                            aha_1980A 1 Reply Last reply 8 May 2019, 17:30
                            0
                            • P Pavel_47
                              8 May 2019, 17:26

                              Well, I'm not sure I understood you correctly.
                              I've found QtCreator in Programming section of Application menu.
                              But neither section in Application menu mentions Qt framework itself.
                              The location of QtCreator executive I can check with
                              "which qtcreator" command.
                              It's located in /usr/bin. But there is no any folder named mkspec.

                              aha_1980A Offline
                              aha_1980A Offline
                              aha_1980
                              Lifetime Qt Champion
                              wrote on 8 May 2019, 17:30 last edited by
                              #14

                              @Pavel_47

                              Please start Qt Creator, go to menu Tools > Options > Kits (or Build & Run if you have an older Qt Creator version) > Qt Versions:

                              0_1557336564505_edf2577a-8c2b-4cd1-a284-4d7ba90a3215-grafik.png

                              There you have all your Qt versions listed and the path to qmake

                              Regards

                              Qt has to stay free or it will die.

                              1 Reply Last reply
                              1
                              • P Offline
                                P Offline
                                Pavel_47
                                wrote on 8 May 2019, 17:45 last edited by
                                #15

                                Yes, I've located it. Thanks.
                                What about -lGLESv2 option ? I didn't find any makefile in mkspecs directory.
                                Only qconfig.pri, qfeatures.pri, qmodule.pri. Should I check any of them for -lGLESv2 option ?

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 8 May 2019, 19:02 last edited by
                                  #16

                                  No, it's in the devices subfolder. The one dedicated to RPi3.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • P Offline
                                    P Offline
                                    Pavel_47
                                    wrote on 9 May 2019, 18:01 last edited by
                                    #17

                                    There are 4 subfolders in devices subfolder that are in relation with RPi:

                                    • linux-rasp-pi2-g++
                                    • linux-rasp-pi-g++
                                    • linux-rpi3-g++
                                    • linux-rasp-vc-g++
                                      Inside of all these subfolder there are filses qmake.conf
                                      In every there are settings:
                                    QMAKE_LIBS_EGL = -lEGL -lGLESv2
                                    QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2
                                    

                                    I replaced GLESv2 with brcmGLESv2 in all qmake.conf files (i.e. in 4 folders).
                                    Didn't help: when compiling project in QtCreator, I still see the same error message:
                                    cannot find -lGLESv2

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 9 May 2019, 19:04 last edited by
                                      #18

                                      Might be a silly question but are you sure you are modifying the one from your self-built Qt ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • P Offline
                                        P Offline
                                        Pavel_47
                                        wrote on 9 May 2019, 22:47 last edited by
                                        #19

                                        I modify those, found in the location, specified in QtCreator: Tools->Options->Kits->Qt Versions

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 10 May 2019, 21:30 last edited by
                                          #20

                                          Did you check what your Kits are using as mkspecs ?

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          0

                                          1/20

                                          5 May 2019, 20:57

                                          • Login

                                          • Login or register to search.
                                          1 out of 20
                                          • First post
                                            1/20
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved