Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.1
-
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
For Gerrit Dashboard: QTBUG-45774 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
111119,3 | Use stdint.h in qopengl headers on MSVC too | 5.5 | qt/qtbase | Status: MERGED | +2 | 0 |