wangwenx190 / framelesshelper

Project moved to: https://github.com/stdware/qwindowkit Cross-platform window customization framework for Qt Widgets and Qt Quick. Supports Windows, Linux and macOS.
MIT License
846 stars 203 forks source link

mocs_compilation.cpp.obj:-1: error: LNK2005: "public: bool __thiscall QByteArray::isNull(void)const " (?isNull@QByteArray@@QBE_NXZ) 已经在 Qt6Core.lib(removed_api.cpp.obj) 中定义 #285

Closed fgfxf closed 1 year ago

fgfxf commented 1 year ago

mocs_compilation.cpp.obj:-1: error: LNK2005: "public: bool __thiscall QByteArray::isNull(void)const " (?isNull@QByteArray@@QBE_NXZ) 已经在 Qt6Core.lib(removed_api.cpp.obj) 中定义

wangwenx190 commented 1 year ago

是否是静态编译的Qt?

fgfxf commented 1 year ago

对,vs2022静态编译的QT6.5.2

wangwenx190 commented 1 year ago

你是直接用CMake编译的还是用那个configure.bat编译的?

fgfxf commented 1 year ago

QT打开cmakelist编译,出现的。 msvc.bat不管用,就算配置了vs2022的环境变量prompt也不行。

wangwenx190 commented 1 year ago

不是,我问的是你怎么编译Qt的,是直接手动调用CMake还是借助了那个configure.bat

fgfxf commented 1 year ago

借助configure.bat

wangwenx190 commented 1 year ago

编译Qt时,加一个参数重新编译:-disable-deprecated-up-to 0x070000,看看能不能解决

wangwenx190 commented 1 year ago

最新代码应该是没这个问题了,有时间请验证一下