为什么VS2015 C++编译器改了函数也不需要编译?
Why does VS2015 C++ compiler not need to compile functions even when changed?
我们最近升级到 Visual Studio Pro 2015,我在编译时开始看到这样的东西:
2>--- Build started: Project: MyProject, Configuration: Release Win32 ---
2> MyFile.cpp
2> Generating code
2> 0 of 631 functions ( 0.0%) were compiled, the rest were copied
from previous compilation.
2> 0 functions were new in current compilation
2> 0 functions had inline decision re-evaluated but remain unchanged
2> Finished generating code
2> MyProject.vcxproj -> Bin\Release\MyProject.exe
2> MyProject.vcxproj -> Bin\Release\MyProject.pdb (Full PDB)
========== Build: 2 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
具体来说,这行声明它不必编译我的 631 个函数中的 any。即使我实际上 更改 代码也会出现这种情况,这似乎有点奇怪。
无论我在保存后编译多快,它也会发生,事实上,如果我编译未保存,让 IDE 自动保存它,它也会发生。
为什么 Visual Studio 似乎在声明它已经编译了我的代码,不需要再次编译?
对于它的价值,进一步的调查显示可执行文件 是 当我更改代码时正在更新,所以现在归结为:为什么 VS 告诉我不需要编译?
我遇到了类似的问题,但在社区版本中,对我有用的是重新构建解决方案。
构建 --> 构建解决方案。
更新构建后,您可以 运行 您的代码和 "Visual Studio already compiled your code and doesn't need to do so again" 应该消失的消息。
我们最近升级到 Visual Studio Pro 2015,我在编译时开始看到这样的东西:
2>--- Build started: Project: MyProject, Configuration: Release Win32 ---
2> MyFile.cpp
2> Generating code
2> 0 of 631 functions ( 0.0%) were compiled, the rest were copied
from previous compilation.
2> 0 functions were new in current compilation
2> 0 functions had inline decision re-evaluated but remain unchanged
2> Finished generating code
2> MyProject.vcxproj -> Bin\Release\MyProject.exe
2> MyProject.vcxproj -> Bin\Release\MyProject.pdb (Full PDB)
========== Build: 2 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
具体来说,这行声明它不必编译我的 631 个函数中的 any。即使我实际上 更改 代码也会出现这种情况,这似乎有点奇怪。
无论我在保存后编译多快,它也会发生,事实上,如果我编译未保存,让 IDE 自动保存它,它也会发生。
为什么 Visual Studio 似乎在声明它已经编译了我的代码,不需要再次编译?
对于它的价值,进一步的调查显示可执行文件 是 当我更改代码时正在更新,所以现在归结为:为什么 VS 告诉我不需要编译?
我遇到了类似的问题,但在社区版本中,对我有用的是重新构建解决方案。
构建 --> 构建解决方案。
更新构建后,您可以 运行 您的代码和 "Visual Studio already compiled your code and doesn't need to do so again" 应该消失的消息。