Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OpenGL QGLWidget help needed!
Qt 6.11 is out! See what's new in the release blog

OpenGL QGLWidget help needed!

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 3.4k 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.
  • S Offline
    S Offline
    sheetekela81
    wrote on last edited by
    #1

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QGLFormat::QGLFormat(class QFlags<enum QGL::FormatOption>,int)" (_imp??0QGLFormat@@QEAA@V?$QFlags@W4FormatOption@QGL@@@@H@Z) referenced in function main
    File not found:main.obj

    What can one to with this any one with an idea.?

    Sincerely yours
    Dr. Sheetekela

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      i have to ask:
      are you sure you have a Qt version with OpenGL support? :)
      Also you need to link against the OpenGL module (in your PRO file).
      @
      QT += opengl
      @

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sheetekela81
        wrote on last edited by
        #3

        Yes,
        Thank you very much.
        I have solved the problem.

        Sincerely yours
        Dr. Sheetekela

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sheetekela81
          wrote on last edited by
          #4

          scene.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl QtBox::QtBox(int,int,int)" (??0QtBox@@QEAA@HHH@Z) referenced in function "public: __cdecl Scene::Scene(int,int,int)" (??0Scene@@QEAA@HHH@Z)

          Could you help with this please code error.? what could be wrong in the code,?

          Sincerely yours
          Dr. Sheetekela

          1 Reply Last reply
          0
          • N Offline
            N Offline
            NicuPopescu
            wrote on last edited by
            #5

            it seems you miss the QtBox's definition code, .cpp file where is implemented ...

            1 Reply Last reply
            0
            • raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              "unresolved external symbol" error message always means that the linker can't find the implementation of the code.

              Either you

              • don't link against the library containing the implementation, or
              • just forgot to add the file containing the implementing (most probably the cpp file) into your project

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sheetekela81
                wrote on last edited by
                #7

                Thank you very much. problem resolved.

                Sincerely yours
                Dr. Sheetekela

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sheetekela81
                  wrote on last edited by
                  #8

                  What is the maximum depth buffer one can use for numerical precision 32bit or 64bit, to avoid undesirable clipping on image scale and large detailed geometry calculations?

                  Sincerely yours
                  Dr. Sheetekela

                  1 Reply Last reply
                  0
                  • Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    The usual depth buffers are 24 or 32 bit.
                    There are certain techniques to fight precision problems. first of all make sure you set clipping planes tightly around your geometry to maximize the use of available precision.
                    Another thing to think about is using non-linear depth buffer. There are different approaches suitable for specific needs so you'll have to figure out which is the best for you.
                    Here's a great comparison of different formats you can try: "Attack of the depth buffer":http://mynameismjp.wordpress.com/2010/03/22/attack-of-the-depth-buffer/ . It uses DirectX but it's mostly the same with OpenGL.

                    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