I've been running into this same problem. I created a project using MinGW, and now want to build with MSVC. Below is what I added to the .pro file, and is working for me (non of the above did).
win32-msvc* {
LIBS += Advapi32.lib Setupapi.lib
CONFIG -= dll
CONFIG += shared static
}
The LIBS was required as the "difference" of mingw.
Bookmarks