Cannot open include file: 'ole2.h'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • curious2007
    New Member
    • Jun 2007
    • 71

    Cannot open include file: 'ole2.h'

    Hello,

    I am getting the following error:

    1>main.cpp
    1>c:\program files\microsoft visual studio 8\vc\include\co mdef.h(24) : fatal error C1083: Cannot open include file: 'ole2.h': No such file or directory
    1> This error occurred in injected text:
    1>
    1>//+++ Start Injected Code
    1>#injected_lin e 12 "c:\\users\\adm in\\documents\\ visual studio 2005\\projects\ \vec\\vec\\exce ldriver.hpp"
    1>#include <comdef.h>
    1>//--- End Injected Code

    I would appreciate any suggestions. Thanks.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Originally posted by curious2007
    1>c:\program files\microsoft visual studio 8\vc\include\co mdef.h(24) : fatal error C1083: Cannot open include file: 'ole2.h': No such file or directory
    It looks like you may not have downloaded the Platform SDK. ole2.h should be here on your computer:

    C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSD K\Include

    This is very common header. I'm surprised it'scaysing you trouble.

    Comment

    • curious2007
      New Member
      • Jun 2007
      • 71

      #3
      Yes, you are right I don't have a Platform SDK under VC. How can I get this? Do I have to reinstall Visual C++ Express?

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        It's a free download from the Microsoft web site.

        When you go to their Download Center, you will see several SDKs to choose from.

        Comment

        • curious2007
          New Member
          • Jun 2007
          • 71

          #5
          Ok, but this seems a little confusing. There seems to be different versions:

          Microsoft® Windows Server 2003 SP1 Platform SDK - April 2005 Edition
          Microsoft® Windows Server 2003 SP1 Platform SDK - February 2003 Edition

          On the website it says: "The last SDK that will work with VC 6.0 is the February 2003 Edition".

          However, I am using Microsoft Vista. Is this going to be compatible with February 2003 edition?

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            Backwards compatibility is not guaranteed. The Platform SDK is really several SDK's (it's broken into sections by major application area) and is updated on a monthly basis. This is for the purpose of bug fixing.

            A serious user of the Platform SDK will download it each month to stay current and get the bug fixes.

            Comment

            • curious2007
              New Member
              • Jun 2007
              • 71

              #7
              OK, I have downloaded SDK and integrated it with Visual C++. Now, I get the following error:

              fatal error C1083: Cannot open type library file: 'mso9.dll': No such file or directory

              Comment

              • weaknessforcats
                Recognized Expert Expert
                • Mar 2007
                • 9214

                #8
                I did a Google on mso9.dll and got 30,900 web pages.

                Some of these advertized a download.

                Comment

                • curious2007
                  New Member
                  • Jun 2007
                  • 71

                  #9
                  OK, I have downloaded the mso9.dll and put it under system32 directory. I am not getting that error anymore though the program is still not working. I will post another thread. Thanks.

                  Comment

                  Working...