Mohamed Mansour's Personal Website
Cannot open include files for ATL t2embapi.h while having VS2008 installed
Posted on August 3, 2009, 5:18 pm EST
I had trouble this morning trying to figure out why Chromium wont compile, it turned out to be that my installation of Visual Studio Express C++ messed up my configuration! So if you have installed Visual Studio 2008 (VS 2008), and while compiling your C++ Windows application you see an unusual error like the following, don't panic, its an easy fix!
CODE: fatal error C1083: Cannot open include file: 't2embapi.h': No such file or directory
What does it mean?
Basically, its informing you that it cannot find the specified file "t2embapi.h" while compiling your application. There are two reasons why this might be happen:
- You have not installed the latest Windows SDK (currently it is
Windows SDK 6.1Windows SDK 7 )
- You are not targeting the correct Windows SDK. Still targetting 6.0A (which is the default version) but you already installed the above 6.1 or 7.0)
How to target the right SDK.
Some reasons why it wont target the correct Windows SDK is because you have simply installed an application that overwrote that. For example, you have installed VS2008 PRO first, but then installed VS2008 C++ Express. All Windows Express suit, do not support ATL so it is using the default paths of 6.0A. It overwrites all the default registry and uses the old registry which it doesn't have those include files.
How to fix, the correct way!
Basically, you would have to revert your registry settings to point it back to Windows SDK
6.1 7.0. To do so, open up "regedit" and find this key:
CODE: HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows\CurrentVersion = v7.0 HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder = C:\Program Files\Microsoft SDKs\Windows\v7.0\
Similar to this screenshot:
I hope this helped anyone out there!