By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,827 IT Pros & Developers. It's quick & easy.

Cannot open include file: 'ole2.h'

P: 71
Hello,

I am getting the following error:

1>main.cpp
1>c:\program files\microsoft visual studio 8\vc\include\comdef.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_line 12 "c:\\users\\admin\\documents\\visual studio 2005\\projects\\vec\\vec\\exceldriver.hpp"
1>#include <comdef.h>
1>//--- End Injected Code

I would appreciate any suggestions. Thanks.
Aug 10 '07 #1
Share this Question
Share on Google+
8 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
1>c:\program files\microsoft visual studio 8\vc\include\comdef.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\PlatformSDK\Include

This is very common header. I'm surprised it'scaysing you trouble.
Aug 10 '07 #2

P: 71
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?
Aug 12 '07 #3

weaknessforcats
Expert Mod 5K+
P: 9,197
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.
Aug 12 '07 #4

P: 71
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?
Aug 13 '07 #5

weaknessforcats
Expert Mod 5K+
P: 9,197
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.
Aug 14 '07 #6

P: 71
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
Aug 22 '07 #7

weaknessforcats
Expert Mod 5K+
P: 9,197
I did a Google on mso9.dll and got 30,900 web pages.

Some of these advertized a download.
Aug 22 '07 #8

P: 71
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.
Aug 23 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.