Building Qt app with __stdcall flag (QMAKE_CFLAGS += /Gz) causes compilation errors



  • I’m facing a similar problem changing calling convention to cdecl gives “Interlocked” errors in files qatomic_windows.h and intrin.h. I’m tried on Visual Studio using QT VS Plugin and QT Creator.
    Steps to recreate:
    Visual Studio
    Create a QT console application.
    VS properties -> Configuration Properties -> C/C++ -> Advanced -> Calling Convention.
    Change to __stdcall (/Gz)
    Qt Creator
    Create a console or any other application
    In the .pro file add the following lines
    QMAKE_CFLAGS += /Gz
    QMAKE_CXXFLAGS += /Gz
    Build the project
    Platform Details:
    Windows 7 64 bit
    Visual Studio 2010
    QT Version 4.8.2


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.