Game Development Community

Beta 3 build error - atlbase.h

by Matt Brasier · in Torque 3D Professional · 07/06/2009 (1:45 pm) · 3 replies

I have a very simple project with no code modifications, when I try and build a debug build with VS2008 I get the following error:
1>c:\torque\torque 3d 2009 beta 3\my projects\playpen\web\source\activex\stdafx.h(19) : fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory

Matt

#1
07/06/2009 (2:08 pm)
You need Visual Studio Standard or Pro to build ActiveX controls. If you disable the IE plugin in the solution, you should no longer receive this error.
#2
07/06/2009 (2:10 pm)
Thanks, thats done the trick!
#3
05/13/2010 (8:16 pm)
atlbase.h is a header file which is provided by the Microsoft Active Template Library.

The error "System header atlbase.h is not available" indicates that you do not have a copy of ATL in your INCLUDE directory. There are several ways you can solve this problem:

Use the Professional Version of Microsoft Visual C++
The professional version of Microsoft Visual C++ comes with ATL headers.

Use the Windows 2003 SDK
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=e15438ac-60be-41bd-aa14-7f1e0f19ca0d&displayLang=en
The Windows 2003 SDK is a free download and is the last version of the Windows SDK to come with ATL headers.

NOTE: The Windows 2008 SDK, which the 2003 SDK page points you to, doesn't have the ATL headers.

https://developer.mozilla.org/en/atlbase.h

Installing the Platform SDK for use with Visual C++ Express Edition

Install the Microsoft Platform SDK over the Web from the Platform SDK Update site. At a minimum, you will need to install the Windows Core SDK. However, several samples utilize the functionality in other SDKs, so it is recommended that you perform a complete install.

From the Tools menu in Visual Studio, select Options. The Options dialog box appears.

From the Options dialog box, expand the Projects and Solutions node and select VC++ Directories. In that section, add the following paths to the appropriate subsection:

Executable files: C:\Program Files\Microsoft SDK\Bin

Include files: C:\Program Files\Microsoft SDK\include

Library files: C:\Program Files\Microsoft SDK\lib

Note
The location of the Platform SDK might be different on your system.
Update the corewin_express.vsprops file (found in %VSINSTALLDIR%\VC\VCProjectDefaults) and change the string that reads:

AdditionalDependencies="kernel32.lib"

to:

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Update the default.js file (found in %VSINSTALLDIR%\VC\VCWizards\AppWiz\Generic\Application\scripts\1033) and change the two lines that read:

LinkTool.AdditionalDependencies = "kernel32.lib $(NoInherit)";

to:

// LinkTool.AdditionalDependencies = "kernel32.lib $(NoInherit)";

To integrate the Platform SDK documentation into the Visual C++ Express documentation, follow the instructions at Visual Studio 2005 Express Edition Combined Help Collection Manager.

Generate and build a Win32 application to test your paths.

For this, you can use one of the many samples provided in the Help files, such as CPUID Sample: Determines CPU Capabilities. To verify that everything is working, build and run the sample as documented in the help topic.
http://msdn.microsoft.com/en-us/library/ms235626(VS.80).aspx

Installing the Platform SDK for use with Visual C++ Express Edition

When using Visual C++ Express Edition to compile and build win32 application it will get a error like:
‘fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory’

To Solve it you must install Microsoft Platform SDK.

There is some steps to setting up visual c++ Express edition for use Platform SDK:

From the Tools menu in Visual Studio, select Options. The Options dialog box appears.From the Options dialog box, expand the Projects and Solutions node and select VC++ Directories. In that section, add the following paths to the appropriate subsection:
Executable files: C:Program FilesMicrosoft SDKBin
Include files: C:Program FilesMicrosoft SDKinclude
Library files: C:Program FilesMicrosoft SDKlib
Update the corewin_express.vsprops file (found in %VSINSTALLDIR%VCVCProjectDefaults) and change the string that reads:AdditionalDependencies=”kernel32.lib”to:
AdditionalDependencies=”kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib”

Update the default.js file (found in %VSINSTALLDIR%VCVCWizardsAppWizGenericApplicationscripts1033) and change the two lines that read:LinkTool.AdditionalDependencies = “kernel32.lib $(NoInherit)”;
to:

// LinkTool.AdditionalDependencies = “kernel32.lib $(NoInherit)”;

These is optional, in my case there is few more settings, in properties of projects, in C/C++ section, Additional Include Diretories field, fill with “C:Program FilesMicrosoft Platform SDKInclude” (if platform sdk is installed in default location)
Optional, check in Linker section, field Additional Dependencies must re-check, in my case there are few libs file that must be added here, like user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
http://www.pitangso.com/2009/09/09/programming/visual-studio/how-to-installing-the-platform-sdk-for-use-with-visual-c-express-edition/