我正在更改我的代码,但编译的程序不受影响

I'm changing my code but the compiled program isn't being affected

本文关键字:编译 程序 不受影响 代码 我的      更新时间:2023-10-16

我正在用c++做一个项目。我关闭了Codeblocks并重新打开它,现在当我编辑,保存和编译代码时,.exe根本没有改变。日志显示"正在检查是否存在:C:UsersAJCodesndbrdbinDebugsndbrd.exe"执行:"C:Program FilesCodeBlocks/cb_console_runner.exe" "C:UsersAJCodesndbrdbinDebugsndbrd.exe" (in C:UsersAJCodesndbrd.)"另外,我有两个可执行文件,main.exe,位于main.cpp所在的位置,sndbrd bin/debug 文件夹中。

编译器使用obj executable/obj-files/pcp -header文件的时间戳来确定是否需要编译/链接。无论出于何种原因,如果您的可执行文件/obj-files时间戳> pcp -头文件,(即。Cpp-header是较新的)那么编译器不会认为编译/链接是必要的。

简单的解决方法是删除所有的obj/exe文件,然后重新编译。