문제

가능한 중복 :
Visual Studio는 모든 것을 빌드합니다

동일한 프로젝트의 다른 파일에 포함 된 .c 파일을 생성하는 IDL 파일이 포함 된 프로젝트가 있습니다.

나는이 프로젝트를 짓고 모두가 괜찮습니다, 나는 프로젝트를 실행하려고 노력하고 프로젝트가 오래된 것으로 밝혀지고 나는 그것을 짓고 싶습니다.빌드하려면 예를 선택하면 IDL이 다시 컴파일됩니다.

VS 프로젝트 설정을 설정하지 않고이 문제를 멈추지 않고 빌드에 대해 묻지 않아도됩니다.

도움이 되었습니까?

해결책

Once you've built the .idl file once, open it's properties and enable "Exclude from Build".

If you update the file, you can build it manually by selecting the file in Solution Explorer and choosing "Compile" (the shortcut is Ctrl+F7 on my setup, but this may vary).

If you don't include the generated files in your version control system, a fresh checkout will also need to manually rebuild the .idl file. This case in particular can cause a lot of confusion - it may be worth including the generated files under version control.

Another option is to create a custom build tool (or pre-build event), which would 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 behaviour that VS uses to determine whether or not to run CL, but it is not used for MIDL and, as far as I know, cannot be enabled in VC++ 2008 project files.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top