Qt: windows functions are unresolved external symbols

后端 未结 2 1994
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 20:38

I\'m trying to compile a simple helloworld-like non-Qt C++ application using te WinAPI in QtCreator. Here\'s the code:

#include 

int main()         


        
2条回答
  •  佛祖请我去吃肉
    2020-12-11 21:26

    Additional to Frank's answer (which helped me very much, thanks for that!) I would like to add that this is only required vor MSVC, MinGW doesn't seem to need that line. Which was for me the most confusing part, I first thought I had problems with the msvc toolchain.

    My inclusion now looks like this to reflect this fact:

    msvc: LIBS += -luser32
    

提交回复
热议问题