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

QtOpenGL should use stdint.h also on Windows with MSVC

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0
    • 5.4.1
    • GUI: OpenGL
    • 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
        For Gerrit Dashboard: QTBUG-45774
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            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