qwindowkit
qwindowkit copied to clipboard
Does not work with qmsetup (generating unnecessary outputs from a folder)
Using this repository as a library causes strange behavior that leads to a breakdown.
Reproducing the problem:
For my project, I made an addition as a qmsetup module in the qmsetup
folder, then I made it as a QWK module in the resources/library
folder
I used add_subdirectory(resources/library/qwindowkit)
and stuff like LINKS QWKWidgets
from the example MainWindow.
When building a project, it outputs the following log:
\resources\library\qwindowkit\src\widgets\widgetitemdelegate.cpp(11): fatal error C1083: The file cannot be opened: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
resources\library\qwindowkit\include\QWKCore\private\../../../../../../../NewLaucnher/resources/library/qwindowkit/src/core/windowagentbase_p.h(18): fatal error C1083: Не удается открыть файл включение: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
resources\library\qwindowkit\include\QWKCore\private\../../../../../../../NewLaucnher/resources/library/qwindowkit/src/core/windowagentbase_p.h(18): fatal error C1083: Не удается открыть файл включение: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
I decided to just add it as in your example (I moved it to the repository as a submodule in the library) - as a result, there are some problems with qmsetup (or in the project itself), but it does not want to collect private QWKCore headers.
Use Windows 11, Qt 6, MSVS
My temporary solution (It's a crutch of some kind...)
Open file in build folder (abstractwindowcontext_p.h)
// broken (autogen)
#include "../../../../../../../<root project>/resources/library/qwindowkit/src/core/contexts/abstractwindowcontext_p.h"
// normal
#include "../../../../../<root project>/resources/library/qwindowkit/src/core/contexts/abstractwindowcontext_p.h"
P.S Changing this parameter made it possible to use the repository without any corrections (as a submodule + using add_subdirectory() and LINKS) (except for this of course!)
set(QWINDOWKIT_BUILD_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/../etc/include)
Remove ../
set(QWINDOWKIT_BUILD_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/etc/include)
In fact, your repository does not allow you to just use it in another project on qmsetup, because it was expected that it would collect and then just spit it out in build (+with automatic installation). Or maybe I made a mistake in something?
Sorry I cannot quite understand your description. Could you please upload a minimum project that reprocudes this issue?
@SineStriker 你好,我也遇到了这个问题,qwindowkit
不能被置于多重目录下,如果是2-3层,如3rdparty/qwindowkit
是可以的,但是如果是3rdparty/RibbonUI/lib_source/3rdparty/qwindowkit
这样多重的目录,将会出现与@Sepera-okeq 一样的错误,我最终通过放置在二级目录下解决。
复现步骤:
-
git clone https://github.com/mentalfl0w/RibbonTemplate.git
-
cd RibbonTemplate
-
git switch -d c61c647
-
mkdir build
-
cmake --build ./build --target all
@SineStriker 你好,我也遇到了这个问题,
qwindowkit
不能被置于多重目录下,如果是2-3层,如3rdparty/qwindowkit
是可以的,但是如果是3rdparty/RibbonUI/lib_source/3rdparty/qwindowkit
这样多重的目录,将会出现与@Sepera-okeq 一样的错误,我最终通过放置在二级目录下解决。 复现步骤:
git clone https://github.com/mentalfl0w/RibbonTemplate.git
cd RibbonTemplate
git switch -d c61c647
mkdir build
cmake --build ./build --target all
我试了一下,放在四层目录里都没发现问题...
@SineStriker 你好,我也遇到了这个问题,
qwindowkit
不能被置于多重目录下,如果是2-3层,如3rdparty/qwindowkit
是可以的,但是如果是3rdparty/RibbonUI/lib_source/3rdparty/qwindowkit
这样多重的目录,将会出现与@Sepera-okeq 一样的错误,我最终通过放置在二级目录下解决。 复现步骤:
git clone https://github.com/mentalfl0w/RibbonTemplate.git
cd RibbonTemplate
git switch -d c61c647
mkdir build
cmake --build ./build --target all
我试了一下,放在四层目录里都没发现问题...
也有可能是子项目嵌套导致的,因为我是Aadd_subdirectory
B,Badd_subdirectory
qwindowkit,然后编译A的时候就出现这个问题了,直接从A链接B目录下的qwindowkit也是一样的问题,但如果将qwindowkit放在A的二级目录下再编译就可以了。
如果方便的话,可以直接在Qt Creator内打开我昨天提到的那个样本项目,切换到c61c647
提交,再编译,将在mingw和msvc两个编译链下复现此问题。
3. c61c647
这个分支在我这里成功编译通过了
我在GitHub Action的Windows Server上也测试通过,但是在AMD64的电脑/虚拟机中编译不通过,出现上述报错。系统:Windows 11和Windows 10环境:Qt 6.5.3、Qt 6.6.3、Qt 6.7.0但是macOS下均测试通过。方便告知一下测试环境吗?在 2024年5月4日,16:00,SineStriker @.***> 写道:
- c61c647
这个分支在我这里成功编译通过了
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
我在GitHub Action的Windows Server上也测试通过,但是在AMD64的电脑/虚拟机中编译不通过,出现上述报错。系统:Windows 11和Windows 10环境:Qt 6.5.3、Qt 6.6.3、Qt 6.7.0但是macOS下均测试通过。方便告知一下测试环境吗?在 2024年5月4日,16:00,SineStriker @.> 写道: 3. c61c647 这个分支在我这里成功编译通过了 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
Windows 10,Qt 6.6.1
我在GitHub Action的Windows Server上也测试通过,但是在AMD64的电脑/虚拟机中编译不通过,出现上述报错。系统:Windows 11和Windows 10环境:Qt 6.5.3、Qt 6.6.3、Qt 6.7.0但是macOS下均测试通过。方便告知一下测试环境吗?在 2024年5月4日,16:00,SineStriker @.> 写道: 3. c61c647 这个分支在我这里成功编译通过了 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: _@**.**_>
Windows 10,Qt 6.6.1
Windows 11, Qt 6.6.1,MSVC2019测试不通过
补充:Qt 6.6.1,MinGW测试也不通过,同时它只有管理员权限运行才可以完成cmake的configure
管理员权限这事你去看看是不是qmcorecmd被Windows识别为安装包了。我建议你把你的项目放在某个盘的根目录编译试试,我怀疑是路径太长的缘故。
管理员权限这事你去看看是不是qmcorecmd被Windows识别为安装包了。我建议你把你的项目放在某个盘的根目录编译试试,我怀疑是路径太长的缘故。
确实是路径太长了,放在C盘根目录下就一切正常。
MinGW版本的configure流程是在install步骤下出的错,有可能是被识别成安装包了。
管理员权限这事你去看看是不是qmcorecmd被Windows识别为安装包了。我建议你把你的项目放在某个盘的根目录编译试试,我怀疑是路径太长的缘故。
确实是路径太长了,放在C盘根目录下就一切正常。 MinGW版本的configure流程是在install步骤下出的错,有可能是被识别成安装包了。
我明白了,是mingw把清单给忽略了,那我稍微改改qmsetup。
麻烦您现在再试试
麻烦您现在再试试
MinGW一切正常,非常感谢👍
Using this repository as a library causes strange behavior that leads to a breakdown.
Reproducing the problem:
For my project, I made an addition as a qmsetup module in the
qmsetup
folder, then I made it as a QWK module in theresources/library
folderI used
add_subdirectory(resources/library/qwindowkit)
and stuff likeLINKS QWKWidgets
from the example MainWindow.When building a project, it outputs the following log:
\resources\library\qwindowkit\src\widgets\widgetitemdelegate.cpp(11): fatal error C1083: The file cannot be opened: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
resources\library\qwindowkit\include\QWKCore\private\../../../../../../../NewLaucnher/resources/library/qwindowkit/src/core/windowagentbase_p.h(18): fatal error C1083: Не удается открыть файл включение: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
resources\library\qwindowkit\include\QWKCore\private\../../../../../../../NewLaucnher/resources/library/qwindowkit/src/core/windowagentbase_p.h(18): fatal error C1083: Не удается открыть файл включение: QWKCore/private/abstractwindowcontext_p.h: No such file or directory,
I decided to just add it as in your example (I moved it to the repository as a submodule in the library) - as a result, there are some problems with qmsetup (or in the project itself), but it does not want to collect private QWKCore headers.
Use Windows 11, Qt 6, MSVS
My temporary solution (It's a crutch of some kind...)
Open file in build folder (abstractwindowcontext_p.h)
// broken (autogen) #include "../../../../../../../<root project>/resources/library/qwindowkit/src/core/contexts/abstractwindowcontext_p.h" // normal #include "../../../../../<root project>/resources/library/qwindowkit/src/core/contexts/abstractwindowcontext_p.h"
Consider put your repository in the root of the drive, I guess the issue should be caused by the long-path strategy.