This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

before build/rebuild run my exe

Hi

    I'm a student doing an experiment.

    I want to use an exe file to automatically change the version number in a .h file.This exe file is called before keil compiles and is compiled after the version number is increased.

    After setting the options in keil, I click build/rebuild, but nothing happens.The version number was not increased, and the compile output box did not report an error.But if I double-click on the exe file, it works fine.

    Did I set it up wrong?Keil 5.26.2

thanks

tangyu

Parents
  • Look for a dependency file in your output directory. The file will be named project_target.dep, where project is the uVision project file name and target is the build target (Target 1 in your case). 

    The dependency file should contain a line like this:

    I (Version.h)(0x12345678)

    If it doesn't have a line like this (the hex number will be different), then the build system doesn't see Version.h as a dependency of any project file. So changes in Version.h won't cause anything to be rebuilt.

    Also, the uVision text editor should notice if Version.h is actually changed on-disk when you have it open in the IDE. 

Reply
  • Look for a dependency file in your output directory. The file will be named project_target.dep, where project is the uVision project file name and target is the build target (Target 1 in your case). 

    The dependency file should contain a line like this:

    I (Version.h)(0x12345678)

    If it doesn't have a line like this (the hex number will be different), then the build system doesn't see Version.h as a dependency of any project file. So changes in Version.h won't cause anything to be rebuilt.

    Also, the uVision text editor should notice if Version.h is actually changed on-disk when you have it open in the IDE. 

Children