The problem is that by default it compiles with vc140 and not with vc140_xp. Current Qt versions can build xp with support, but I did this:
- In the required qmake.conf I added the necessary edits so that the correct makefile is generated. For example, for the linker, you must specify the correct version. qtbase / mkspecs / win32-msvc2012 / qmake.conf: QMAKE_LFLAGS_CONSOLE = / SUBSYSTEM: CONSOLE \ ", 5.01 \" QMAKE_LFLAGS_WINDOWS = / SUBSYSTEM: WINDOWS \ ", 5.01 \"
in the project in pch.h or in pro did the _WIN32_WINNT defile on xp, like this:
#define _WIN32_WINNT 0x0502 (for example, it will not inline calls to InitCriticalSectionEx, which only appeared in whist, instead of InitCriticalSection).
Well, if depends shows that the problem is already with qt's libraries, then qt itself needs to be re-created after that (I usually first set up qmakespec rules and then already collected qt myself.
Well, if you need to build a one-time project, you can generate vcxproj (qmake -tp vc) open the project in the studio, and replace the toolset from vc140 with vc140_xp. Then it should work too.