Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] ERROR QOpenGLWidget example - Undefined symbol
Forum Updated to NodeBB v4.3 + New Features

[Solved] ERROR QOpenGLWidget example - Undefined symbol

Scheduled Pinned Locked Moved Mobile and Embedded
22 Posts 2 Posters 9.6k Views 1 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Maybe a silly question but do you have the QtOpenGL library installed on your target ?

    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
    • M Offline
      M Offline
      MorganeJ
      wrote on last edited by
      #3

      Hi,

      When you said "installed" what do you mean ?
      Right now, I just copied my QtOpenGL library inside my binary folder on my target. Is it correct to do it this way ?

      Thank you for your help,

      Morgane

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MorganeJ
        wrote on last edited by
        #4

        I checked if there was any QtOpenGL installed on my target on the Ubuntu Software Center and I have the Qt 5 OpenGL module (libqt5opengl5) installed...

        Any ideas ?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #5

          By installed I mean did you deploy the Qt libraries and plugins on your target.

          Just copying the library beside your binary is not enough. You would also need to set LD_LIBRARY_PATH to folder containing the Qt libraries.

          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
          • M Offline
            M Offline
            MorganeJ
            wrote on last edited by
            #6

            No, I have not done that. I'm a self-learning so I probably missed this part.
            What exactly is the process? Can I set LD_LIBRARY_PATH inside Qt Creator ? Where can I find some clear information about that?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #7

              Yes you can.

              What is your target ?

              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
              • M Offline
                M Offline
                MorganeJ
                wrote on last edited by
                #8

                Thanks a lot for your help.
                My target is a linux (ubuntu 14.04) arm based. I am using the arm-linux-gnueabihf cross compiler.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  Ok, as for the installation part, it's the last step after you called make

                  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
                  • M Offline
                    M Offline
                    MorganeJ
                    wrote on last edited by
                    #10

                    Sorry I do not understand...

                    Are you talking about adding a step inside QtCreator in the Build Steps after the "make" ?
                    Are you talking about the "make" after the ./configure ? So the "make install" step I presume ?

                    I am not able to find information on this LD_LIBRARY_PATH. Where am I supposed to set this variable ? Inside my .pro ? And to what ? Where ? On my target ? Or on my host ?
                    Is it supposed to be set to /usr/local/qt-embedded-5.4.0/lib or something like that ?

                    I am stuck on this error for several days. I tried so many things but none of them work... I will really appreciate your help.

                    Thank you,

                    Morgane

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Yes, make install after make after configure

                      LD_LIBRARY_PATH is not Qt specific it's a Linux environment variable that you can set in Qt Creator, in your current terminal or in a bash script that will start your application.

                      Since you are using Qt Creator and IIRC, you have the option to do it for your target. It must contain the path to where your custom built Qt can be found on the target.

                      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
                      • M Offline
                        M Offline
                        MorganeJ
                        wrote on last edited by
                        #12

                        Ok I see.

                        So if I understand correctly, I do NOT need to re-compile my custom built Qt or anything like that but I need to specify LD_LIBRARY_PATH in my QtCreator.
                        But when you say "It must contain the path to where your custom built Qt can be found on the target."
                        Does it mean that I need to copy my custom build Qt on my target ? It's 1.7GB, it's a lot for an embedded device. I only have it on my host right now.

                        I have a "qt5" folder inside my /usr/lib/arm-linux-gnueabihf on my target with inside three folders "libexec", "plugins" and "qml" but there is nothing about QOpenGL. libexec has QtWebPluginProcess and QtWebProcess. Is it the place where I should have my QOpenGL libraries ?

                        What am I missing ?

                        Thank you,

                        Morgane

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          Since you only have it on your host, how do you expect your device to use it to run your application ? What device is it ? Currently most of them use e.g. sdcards that are generally big enough even for development.

                          You don't need to copy absolutely everything, the plugins/libraries your application is using would be enough

                          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
                          • M Offline
                            M Offline
                            MorganeJ
                            wrote on last edited by
                            #14

                            I copied the libQt5OpenGL.so.5.4.0 and I created the link of libQt5OpenGL.so on my target. I set the LD_LIBRARY_PATH in the Build environnement on Qt Creator to the folder where I copied the libraries but it is still not working...
                            What am I doing wrong ?

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              MorganeJ
                              wrote on last edited by
                              #15

                              I don't understand why is it so difficult to get a QOpenGLWidget working. I search for it and the code is with the QtWidgets.
                              Why a QMessageBox will work perfectly and not a QOpenGLWidget ? What is the difference between them ?

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                It's the Run environment that you must update, it's when you run your application that LD_LIBRARY_PATH is used.

                                QMessageBox only relies on the widget module that seems to be properly deployed

                                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
                                • M Offline
                                  M Offline
                                  MorganeJ
                                  wrote on last edited by
                                  #17

                                  I tried it, setting the LD_LIBRARY_PATH inside the Run Environment but I am still getting the error....

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    MorganeJ
                                    wrote on last edited by
                                    #18

                                    I also tried directly on the board by setting the LD_LIBRARY_PATH inside my terminal, running my binary file but I am still getting exactly the same error. Does it mean that I do not copy the good libraries ? What are they exactly ?

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #19

                                      Which library did you copy exactly ?

                                      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
                                      • M Offline
                                        M Offline
                                        MorganeJ
                                        wrote on last edited by
                                        #20

                                        Hi,

                                        Actually I solved the problems. I copied the libQt5Core.so.5, libQt5Gui.so.5, libQt5OpenGL.so.5 and libQt5Widgets.so.5 in the same directory of the binary file and I do not get the errors about the libraries.

                                        Now I'm dealing with the plugins "xcb" or "eglfs".
                                        First I do not know which one to use for an embedded device. I found somewhere that eglfs is the best. Is it right ?

                                        I'm getting a "Could not create the egl surface: error = 0×300b" when using eglfs...

                                        Any idea ? Should I create a new topic for that ?

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #21

                                          eglfs best ? Depends on your use case. If it's a single application then yes since you won't have the Xorg layer in between.

                                          Yes you should open a new one. In between, are you running an X server when you try to use the eglfs plugin ?

                                          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

                                          • Login

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