I have a project with several MIDL files, which VS ALWAYS recompiles despite them being unchanged. I've tried several tips, including putting the project dir in include path etc. but nothing helps. Problem is that there are header files generated that then affect the recompilation of other "sub-projects", incurring an unneccesary rebuild of components.

Any workaround for this ? I even tried using a Custom Build Tool (with midl.exe), and this normally works for other types of issues, but using midl.exe exhibits the same exact behaviour, i.e the MIDL always being recompiled.

Kind of frustrating...

有帮助吗?

解决方案

Resolved. Problem was that all IDL files compiled generated the same dlldata.c file, which meant that each IDL compilation messed it up for the next IDL file. By setting an explicit path for the DllData file (MIDL/Output) to %(Filename)_dlldata.c it all works as expected.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top