PRB: Cannot Open Include File WImgInterfaces.h

ID: Q159967


The information in this article applies to:


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.


Additional query words: kbdsi


Keywords          : AXSDKControls 
Version           : 1.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: May 3, 1999