Question

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...

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top