gpt4 book ai didi

c - g-wan 不更新 servlet 的依赖项

转载 作者:太空宇宙 更新时间:2023-11-03 23:53:58 26 4
gpt4 key购买 nike

当我修改 g-wan 中包含的 hello.c 以包含带有#define TEST_VALUE 50 的简单 header 并将其输出到 hello.c 文件中时,我注意到对 header 文件的更改没有触发 g- 的更新想更新 servlet。因此,如果我将头文件测试值更改为 51,则输出中不会显示任何更改。如果我对 hello.c 文件进行任何更改,它会导致 g-wan 重新编译包含依赖项的 servlet,并编译 header 中的更改。这是预期的行为吗?我很好奇,因为这意味着在具有许多依赖项的开发过程中,如果所做的所有更改都在依赖项文件中,您将只需要更新主 servlet 文件中的一个字符以触发重新编译。

这种行为已被 Tim Bolton 注意到,所以我决定也对其进行测试,并将其作为一个独立于上一个线程的问题提出。

感谢任何输入。

G-WAN 3.3.28 64-bit (Mar 28 2012 11:24:16) - the latest version I saw in the download as of Oct 19th, 2012 ... running on Ubuntu Server 10.04.4 LTS - 64 bit

最佳答案

Is this the expected behavior?

是的。

that would mean during development with many dependencies, you would need to update just one character in the main servlet file to trigger a re-compile if all the changes being made are in dependency files.

没有。在过去(至少)30 年里,程序员使用了一种更好的方法。

touch Unix 命令正在更新文件的时间戳而不更改其内容。

更改标题时,只需触摸 hello.c servlet。

另请注意,C header 应该比 C 文件更“稳定”。 header 中存储的内容将被许多 C 文件共享,因此您应该考虑将 C 文件用于经常更改的定义

至少您现在知道如何处理这两种情况。

关于c - g-wan 不更新 servlet 的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12993298/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com