PRB: Cannot Open Include File WImgInterfaces.h

Last reviewed: November 27, 1996
Article ID: Q159967
The information in this article applies to:
  • Microsoft ActiveX SDK, version 1.0

SYMPTOMS

When you try to build the ActiveX SDK WebImage sample from Developer Studio, the following error message appears:

   Cannot open include file: WImgInterfaces.h: No such file or directory

CAUSE

The WImgInterfaces.h is an output header file generated by Mktyplib.exe.

When you look at \Inetsdk\Samples\Basectl\Webimage\Makefile, you can see that the Mktyplib.exe is carried out in this manner:

   mktyplib /DWIN32 -I..\Include
            /h $(Proj)Interfaces.h
            /tlb $(Proj).Tlb $(Proj).ODL

This error comes up only if the sample is built within Developer Studio. Note that the sample builds without any errors if you use the Makefile that comes with the WebImage sample by typing "nmake" directly from the command line.

When you build the sample within Developer Studio, the error appears if the project settings are not configured correctly; that is, mktyplib is not carried out with the same options as the Makefile. WImgInterfaces.h is absent because the following /h switch is not specified in the call to mktyplib:

   /h $(Proj)Interfaces.h
   where $(Proj) refers to "WImg" for this particular sample

A similar problem might occur when you build the CARD and OBJVW samples within Developer Studio. The error message indicates that the CardInterfaces.h and ObjVwInt.h files cannot be found.

RESOLUTION

Mirror the Makefile settings exactly in Developer Studio's Build->Settings by following these steps:

  1. From Developer Studio, choose Build->Settings and click either Debug or Release (depending on your build).

  2. Pick the ODL file from the file hierarchy.

  3. Pick the "OLE Types" tab and specify WImgInterfaces.h as the <output Header filename>, ..\Include as <Additional Include directories>, and debug/Wimg.tlb as <Output FileName>.

  4. The /Dwin32 setting is set from the project's OLE Types Tab. Instead of clicking the ODL file from the file hierarchy on the left, click the root node "WebImage - Win32 Debug," pick the OLE Types tab, and you can see that under "Project Options" /D and /Win32 have already been set.


KBCategory: kbprg kbprb
KBSubcategory: AXSDKControls
Additional reference words: 1.00 kbdsi



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 27, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.