We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
工程结构:
src/ bug.cpp bug.hpp main.cpp xmake.lua
文件内容: src/main.cpp
#include "bug.hpp" int main() { bug_func(); }
src/bug.hpp
#pragma once void bug_func();
src/bug.cpp
#include <iostream> #include "bug.hpp" void bug_func() { std::cout << "bug" << std::endl; }
xmake.lua
add_rules("mode.debug", "mode.release") target("bug_test") set_languages("c++17") set_kind("binary") -- 源文件 add_includedirs("src") add_files("src/**.cpp")
先执行xmake命令,build成功,然后把bug.hpp的内容全部删除,再执行xmake
期待的结果是build失败
configure { arch = x64 ccache = true ld = link.exe mode = release plat = windows host = windows ndk_stdcxx = true kind = static buildir = build vs = 2017 cxx = cl.exe }
The text was updated successfully, but these errors were encountered:
我理解,第一次编译成功后,会有缓存,如果只是简单删除bug.hpp,因为缓存的存在,不会报错。 运行如下命令
xmake build --rebuild
因为要重新编译,肯定会报错,可以试试。 如果删除了build文件夹,再xmake也会报错的,因为没有缓存了。 其实好多时候,如果修改了一些文件,还是编译不过,可以试试xmake build --rebuild。 如果你不是删除bug.hpp,而是注释//void bug_func();后保存,也会报错的,因为头文件的时间戳变了,会自动检测到,并重新编译的。
build
xmake
//void bug_func();
Sorry, something went wrong.
我修复了,win可以 从 https://ci.appveyor.com/api/buildjobs/kos8mst19pn3e6sy/artifacts/xmake-installer.exe 这个包重装下 dev版本试试
linux/mac下 请执行 xmake update dev 更新
用了新下的包,bug还是存在,但是我在另一台机器上,用2.3.3 release版本也没有这个bug。 这两台机器只是vs的版本不同
我这边测试 完全按照你的方式操作,linux/win/mac下都测试正常,请确认是否真的更新到了最新dev包
目前我这边测试都正常,如果你这还是有问题,可以尝试自己调试下:https://github.com/xmake-io/xmake/blob/master/xmake/modules/core/project/depend.lua
No branches or pull requests
描述问题
工程结构:
文件内容:
src/main.cpp
src/bug.hpp
src/bug.cpp
xmake.lua
期待的结果
先执行xmake命令,build成功,然后把bug.hpp的内容全部删除,再执行xmake
期待的结果是build失败
相关环境
The text was updated successfully, but these errors were encountered: