views:

49

answers:

1

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?

A: 

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.

Larry Osterman