I have a COM/ATL project with a number of IDL files. Most of these IDL files import oaidl.idl and ocidl.idl.

Whenever I compile my project, Visual Studio calls MIDL to recompile oaidl.idl and ocidl.idl... every single time it encounters the imports. These two IDL files end up getting recompiled multiple times, making project compilation take forever!

Is there a way to force Visual Studio to compile oaidl.idl and ocidl.idl just once?

有帮助吗?

解决方案

You're effectively asking for precompiled headers for IDL files, there's no such functionality in MIDL.EXE.

You might be able to get away with skipping ocidl.idl if you're not building an ActiveX control.

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