Ask a questionAsk a question
 

AnswerRC file dependencies

  • Sunday, August 30, 2009 12:38 PMIrYoKu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hey guys,

    I am using the RC file to embed a binary file in the final .exe program. This binary file is produced in the build process of the project. The problem is that, when this binary file is rebuilt (so it has changed), the rc compiler is not triggered to rebuild the RES file. The RC file should depend on this binary file somehow.

    Someone knows a fix or workaround for this problem?

    Thanks!
    Jorge

Answers

  • Tuesday, September 01, 2009 4:31 AMWesley YaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Jorge,

    Thought the binary file changed, the .rc file doesn't, so the .res rebuilding doesn't occur.
    You could try to specify the Pre-Build Event or Post-Build Event(depending on the process of the embedding) in Project Properties | Configuration Properties | Build Events, call the rc.exe manually after the binary file built.

    Sincerely,
    Wesley
    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Tuesday, September 01, 2009 4:44 AMnobugzMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    You could delete the .res file as part of binary file build process.  Both the Debug and Release one.  Crude but effective.

    Hans Passant.

All Replies

  • Tuesday, September 01, 2009 4:31 AMWesley YaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Jorge,

    Thought the binary file changed, the .rc file doesn't, so the .res rebuilding doesn't occur.
    You could try to specify the Pre-Build Event or Post-Build Event(depending on the process of the embedding) in Project Properties | Configuration Properties | Build Events, call the rc.exe manually after the binary file built.

    Sincerely,
    Wesley
    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Tuesday, September 01, 2009 4:44 AMnobugzMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    You could delete the .res file as part of binary file build process.  Both the Debug and Release one.  Crude but effective.

    Hans Passant.
  • Saturday, October 31, 2009 5:28 PMIrYoKu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I forgot to reply, I just found this in my bookmarks... so, thanks for the replies! I finally used a custom build step, and manually specified the dependencies. Now the build chain works properly.