Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt5 opengl linker errors, and how to debug linking command line in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Qt5 opengl linker errors, and how to debug linking command line in Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 2 Posters 4.3k 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.
  • T Offline
    T Offline
    tseval
    wrote on last edited by
    #1

    Hi, I have a couple of questions related to a linker problem...

    I have a fairly large Qt project using OpenGL which compiles nicely under Qt4. When changing to 5.0.1 I get lots of linker errors related to OpenGL: "unresolved external symbol _imp_glEnd@0" and similar. I am quite certain that I have included the Qt OpenGL module, i.e.

    QT += opengl

    So it seems that something is overriding the linker statement somehow. And this leads me to my next question. In Qt Creator all the linker arguments seem to be packed into a .jom file that is deleted afterwards. Is there some way to output the actual linker command arguments to the console so I can see which libraries are actually linked in?

    Any help would be greatly appreciated

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

      Hi,

      Is you Qt 5 build for OpenGL ES ? In that case and IIRC the fixed pipeline functions are not available. You will need to rebuild Qt with Desktop OpenGL to have them or port your code to use the programmable pipeline.

      Hope it helps

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

        Hi and thanks for the suggestion. That could of course be it, but I use the default Windows Qt5 distribution, with the "Desktop Qt5.0.1 MSVC2010 32 bit" kit, so I'd think that it was Desktop OpenGL? I also get linker errors on all wgl and glu-methods.

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

          I am not sure right now, but i think the default is OpenGL ES/Angle for windows. You'd better double check that

          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
          • T Offline
            T Offline
            tseval
            wrote on last edited by
            #5

            It appears that you are right, OpenGL ES only on windows. That sucks, because I have a ton of legacy code using fixed pipeline... Oh well, I guess I can compile Qt from source, or roll up my sleeves and start a huge rewrite of old code...

            Any ideas on how to show the contents of the linker command line?

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

              I think you can do both: recompile Qt to have access to an OpenGL profile that allows the fixed pipeline and when you're done with that, use a profile that provides both/only the programmable pipeline to update your code base.

              IIRC you have to read the console to see that, but the Makefiles should provide you with some hints

              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