Qt: windows functions are unresolved external symbols

后端 未结 2 1996
佛祖请我去吃肉
佛祖请我去吃肉 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:16

    -L sets the search paths for DLLs, but it doesn't actually link anything. The actual linking is done via -l. Setting the search path for system libraries shouldn't be necessary, but you'll need to link against user32:

    win32:LIBS += -luser32
    

提交回复
热议问题