我有一个Visual Studio C ++解决方案,它似乎以某种方式存在依赖性问题。这里是一些信息:
这里是更多信息。我更改的参数是文件release.h中的单个值。该文件在我#define VERSION的一行中。 VERSION用于返回我软件当前版本的函数中。在更改头文件中的该值后进行构建时,系统正确识别出必须重新编译源文件。重新编译源文件后,我得到以下信息:
1> Generating code
1> 0 of 168 functions ( 0.0%) were compiled, the rest were copied from previous compilation.
1> 0 functions were new in current compilation
1> 0 functions had inline decision re-evaluated but remain unchanged
我还验证了如果我替换VERSION宏并直接使用数字,也会发生相同的行为。如果仅更改数字,就必须执行“清理解决方案”以使解决方案正确构建,我得到的结果相同。
最后,如果我向函数添加一行伪代码,例如:
int i = 7; // i is not used in the function
该构建将在下次正常运行。在这种情况下,重新编译源文件后,我们将看到以下内容:
1> Generating code
1> 2 of 168 functions ( 1.2%) were compiled, the rest were copied from previous compilation.
1> 0 functions were new in current compilation
1> 0 functions had inline decision re-evaluated but remain unchanged
除非进行诸如删除之类的更改,否则其他编译将无法正常工作 int i = 7;
在这种情况下,它将在下次运行。
有想法吗?