VS2008 C ++ compiler continues to ask about creating a project

Possible duplicate:
Visual studio continues to build everything

I have a project that includes an idl file that generates a .c file that is included in another file of the same project.

I create this project, and everything is fine, then I try to start the project, and they tell me that the project is out of date, and I would like to build it. If I select yes to build it, idl will compile again.

Is there a way to stop this without setting up the VS project setting so as never to ask me to build?

+4
source share
1 answer

Once you have created the .idl file once, open its properties and enable "Exclude from assembly."

If you update the file, you can create it manually by selecting the file in Solution Explorer and selecting "Compilation" (shortcut Ctrl + F7 in my setup, but this can change).

If you do not include the generated files in your version control system, a new check will also require you to manually rebuild the .idl file. This case, in particular, can cause a lot of confusion - it might be worth including the generated files under version control.

Another option is to create a custom build tool (or pre-build event) that will compare the last modified date / time of the .idl file with the last modified date / time of the output files, and then call MIDL, if required. This is the behavior that VS uses to determine whether to run CL, but it is not used for MIDL and, as far as I know, cannot be included in VC ++ 2008 project files.

+2
source

Source: https://habr.com/ru/post/1340018/


All Articles