I noticed that the "MemoryBarrier" token is present in the libQt5OpenGLExtensionsd.a library. Should I include it even if nothing in OpenGL's original Qt4 project?
No, it is not connected. OpenGLExtension compiles after QtGui.
Unfortunately, you are attacking that MemoryBarrier () is already installed on Windows, and therefore there is a conflict for this and what qt is. To do this, you can find the official Windows documentation:
http://msdn.microsoft.com/en-us/library/windows/apps/ms684208(v=vs.85).aspx
I just discussed this with Gunnar, the QtGui developer, and I plan to submit the changes to Gerrit to solve your problem.
We used something similar in our project a couple of years ago when we wrote thread-safe QtCore-based singletones:
#if defined __GNUC__ && __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 #define __MEMBARRIER __sync_synchronize(); #elif defined _MSC_VER && defined _WIN64 #define __MEMBARRIER MemoryBarrier(); #else #define __MEMBARRIER #endif
Qt may need to check ifdef MINGW / GCC / VERSION and determine the value of MemoryBarrier.
EDIT: This was fixed about six months ago. For more information, see the following Gerrit overview and related error report:
https://codereview.qt-project.org/#change,68156
and
https://bugreports.qt.io/browse/QTBUG-34080
So upgrade to Qt 5.2.0 and it will work. Otherwise, you may try to back up.
lpapp source share