Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45774

QtOpenGL should use stdint.h also on Windows with MSVC

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.1
    • Fix Version/s: 5.5.0
    • Component/s: GUI: OpenGL
    • Labels:
      None

      Description

      Microsoft Visual C++ starting with version 10 AKA 2010 supports stdint.h.

      When I use VC12 and QT_NAMESPACE=XXX, I get the following error:
      MyTest.cpp(40) : error C2872: 'int32_t' : ambiguous symbol
      could be 'C://Developer/VC12/VC/include\stdint.h(10) : int int32_t'
      or 'y:\depot\qt\qtbase-opensource-src\include\qtgui\../../src/gui/opengl/qopengl.h(227) : XXX::int32_t'

      The problem does not exist when QT_NAMESPACE is not used.
      When I look at src/gui/opengl/qopengl.h and qopenglext.h, I see that stdint.h is never used with MSVC. When corrected, the build problem is gone. I believe stdint.h should be used whenever available.
      Please find attached two simple patch files solving this issue.

        Attachments

        1. qopengl.txt
          0.4 kB
        2. qopenglext.txt
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            Jan Patera Jan Patera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes