CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2000
    Posts
    18

    Use settings to generate file prior to Compile-time

    In visual c++ 6.0, is it possible to generate or touch a file prior to compile time.

    This would allow the use of the __date__ macro in the above file to reflect the time of a build.


  2. #2
    Join Date
    Dec 2000
    Posts
    47

    Re: Use settings to generate file prior to Compile-time

    Well you can shell anything you want during the PreLink phase.. check project settings under the Pre-Link Step tab.. you could write a small console app that just writes the date to a file and run the console app in your pre-link step in another project.


  3. #3
    Join Date
    Dec 2000
    Posts
    18

    Re: Use settings to generate file prior to Compile-time

    Pre-link is post-compile, I want pre-compile


  4. #4
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: Use settings to generate file prior to Compile-time

    http://msdn.microsoft.com/library/te...n_bldrul~1.htm
    http://msdn.microsoft.com/library/de...ld_process.htm


    ****************************************************************************************************
    Ratings are unimportant but feedback is. Let the helper and the worldwide community know what works, perhaps with ratings.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  5. #5
    Join Date
    Dec 2000
    Posts
    18

    Re: Use settings to generate file prior to Compile-time

    As far as I can tell, the following links:
    http://msdn.microsoft.com/library/te...n_bldrul~1.htm

    http://msdn.microsoft.com/library/de...ld_process.htm

    provide information on how to perform pre-link and post-build operations. I am interested in
    pre-compile operations.





  6. #6
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: Use settings to generate file prior to Compile-time

    Then you probably glanced at them, assuming they would not help. Some people do that, and I can't do much to help if they do.

    If I am incorrect and there is not a way to at least add a file extension for files to be processed when out-of-date by a command that is specified for that file extension, then I apologize for wasting your time.


    ****************************************************************************************************
    Ratings are unimportant but feedback is. Let the helper and the worldwide community know what works, perhaps with ratings.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  7. #7
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266

    Re: Use settings to generate file prior to Compile-time

    Perhaps I misunderstand what you are saying. I thought that a rule that runs when an input file is out of date in relation to its output file or if the output file doesn’t exist would be something you could use.


    ****************************************************************************************************
    Ratings are unimportant but feedback is. Let the helper and the worldwide community know what works, perhaps with ratings.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  8. #8
    Join Date
    Dec 2000
    Posts
    18

    Re: Use settings to generate file prior to Compile-time

    My rapid response to your post may suggest that I only glanced at the links that were provided. However, I had read them before sending my original post. That is not to say that they do not contain the information that I am looking for, only that I did not see it in them.

    Also, my search for a "Settings"-only solution is motivated by the need to conform to established build procedures and existing documentation.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured