【问题标题】:I'm changing my code but the compiled program isn't being affected我正在更改我的代码,但编译的程序没有受到影响
【发布时间】:2011-08-20 01:22:50
【问题描述】:

我正在使用 Codeblocks 用 C++ 做一个项目。我关闭了 Codeblocks 并重新打开它,现在当我编辑、保存和编译代码时,.exe 根本没有改变。日志显示“检查是否存在:C:\Users\AJ\Code\sndbrd\bin\Debug\sndbrd.exe 执行中:"C:\Program Files\CodeBlocks/cb_console_runner.exe" "C:\Users\AJ\Code\sndbrd\bin\Debug\sndbrd.exe"(在C:\Users\AJ\Code\sndbrd\.)” 我还有两个可执行文件,main.exe,位于main.cpp 所在的位置,sndbrdbin/debug 文件夹中。

【问题讨论】:

    标签: c++ windows codeblocks


    【解决方案1】:

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

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

    它应该可以工作。

    【讨论】:

      猜你喜欢
      • 2014-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-19
      • 2018-07-24
      • 2019-09-26
      • 1970-01-01
      • 2021-12-18
      相关资源
      最近更新 更多