Long SanYe

Results 19 comments of Long SanYe

it seems that crowTranslate still cannot support dark mode. White of the gui is really dazzling.

The build succeeded. However, the CMakeLists.txt file generated by xmake appears to be incorrect, resulting in a cmake build failure, and IntelliSense in Visual Studio nolonger works normally. ![image](https://github.com/xmake-io/xmake/assets/107804044/d1f20cfe-79cb-4af1-9e47-24b4f2d8c395) ![image](https://github.com/xmake-io/xmake/assets/107804044/7ef73e44-02f0-483a-886f-21417a82a167)

[this is the exmaple project](https://github.com/xmake-io/xmake/files/14596339/test_project.zip) xmake project -k cmake mkdir out cd out cmake .. cmake --build .

[#tmp.zip](https://github.com/xmake-io/xmake/files/12290822/tmp.zip) 我新建了个项目,没办法完全复现但是发现`找不到预编头`和`模块`,`qt生成的ui_mainwindow.h`有关系. 下面是我复现的流程 我给的这个项目基于qt.widgetapp,可以目前编译通过,但如果使用模块,让`add_deps("utilities")`解除注释就会 ```powershell F:\Users\Administrator\Desktop\myCode\###xmake\#tmp\#tmp>xmake -vD checking for platform ... windows checking for architecture ... x64 checking for cl.exe ... D:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\cl.exe checking for Microsoft Visual Studio...

我测试发现,target不添加module并且不使用module编译的静态库的情况下,就不会出现找不到预编译头的问题.

是否可以尝试下 编译预编译头 -> moc编译.h -> module依赖图分析. 因为module一般不会在.h文件里使用吧?先完成前两步就不会在依赖图分析时找不到预编译头和ui_mainwindow.h了. 3年了,[msvc早就声称它们完全实现了C++20 标准模块特性](https://learn.microsoft.com/zh-cn/cpp/cpp/modules-cpp?view=msvc-170),现在我在使用模块也没有遇到什么恶性bug. resharper c++和CLion也完善了vs没有做好的,用于module的智能提示. 对于我来说, 使用module能很大程度地提高开发效率,一个功能不需要分成.h和.cpp也降低了项目的复杂度 今天在使用xmake时无意间又触发了此bug,无奈尝试了下cmake发现其并没有预编译头和module冲突的问题,用起来非常丝滑. cmake project:[pch_module_cmake.7z.zip](https://github.com/xmake-io/xmake/files/12722259/pch_module_cmake.7z.zip) 真的很需要module+pch+qt,拜托xmake快快修复下吧,等得我好辛苦. ![1EED2619](https://github.com/xmake-io/xmake/assets/107804044/9aa21a0d-3c80-462e-9441-e4f640175976)

![image](https://github.com/xmake-io/xmake/assets/107804044/8376889f-b51c-4083-8665-daf34d46600d)

Clion对模块的智能提示就不错,visual studio加上resharper c++后也还行.模块特性用起来又爽,再加上第四代构建系统简直无敌了好吧. 望作者大大可以投入更多的精力完善对c++模块特性以及IDE的支持.c++的模块真的需要一个简洁又强大的构建系统.

确实可以正常编译运行+调试,但是clion的智能提示似乎作废 ![确实可用,但是clion的智能提示似乎无法使用](https://github.com/xmake-io/xmake/assets/107804044/64fd3df9-91d2-474a-af26-f88bc12006a6) 难道是我配置不当?我参考的是[(笔记)如何在 CLion 上调试编译 xmake 项目 - 哔哩哔哩 (bilibili.com)](https://www.bilibili.com/read/cv19446929) xmake.lua如下: ```lua set_project("tmp") add_rules("mode.debug", "mode.release") target("tmp") set_kind("binary") add_files("src/*.cpp") add_files("src/*.ixx") ``` `xmake project -k compile_commands`生成的json如下 ```json [ { "directory": "F:\\Users\\Administrator\\Desktop\\CLion_code\\~xmake\\tmp", "arguments":...