Bringer-of-Light / Qt-Nice-Frameless-Window

Qt Frameless Window for both Windows and OS X, support Aero Snap, drop shadow on Windows, and support Native Style such as round corner, drop shadow on OS X. Based on QMainWindow.
Other
812 stars 202 forks source link

undefined reference to `DwmExtendFrameIntoClientArea' #57

Open L-Super opened 1 year ago

L-Super commented 1 year ago

当我在QtCreator尝试编译Windows example时,先提示GdiPlusColor.h无法找到(原因:改为#include <gdiplus/GdiPlusColor.h>),然后就遇到了这个错误

D:\GithubRepo\Qt-Nice-Frameless-Window\framelesswindow\framelesswindow.cpp:62: error: undefined reference to `DwmExtendFrameIntoClientArea'
D:\GithubRepo\Qt-Nice-Frameless-Window\build-Qt-Nice-Frameless-Window-Desktop_Qt_5_15_2_MinGW_64_bit-Debug\framelesswindow\debug/libframelesswindow.a(framelesswindow.o): In function `CFramelessWindow::setResizeable(bool)':
D:\GithubRepo\Qt-Nice-Frameless-Window\build-Qt-Nice-Frameless-Window-Desktop_Qt_5_15_2_MinGW_64_bit-Debug\framelesswindow/../../framelesswindow/framelesswindow.cpp:62: undefined reference to `DwmExtendFrameIntoClientArea'

请问应该如何解决?

环境: Win 10 21H2 Qt 5.15.2 VS2022(SDK 10)

L-Super commented 1 year ago

明白了,使用MinGW编译器的缘故,无法编译成功,换成MSVC编译器即可。后面的朋友们注意一下

SC-One commented 11 months ago

It's solved , and requested pull. https://github.com/Bringer-of-Light/Qt-Nice-Frameless-Window/pull/59

@L-Super It's ok there(if you need temporary commit): https://github.com/SC-One/Qt-Nice-Frameless-Window