atlbase.h

  • Revision slug: atlbase.h
  • Revision title: atlbase.h
  • Revision id: 66120
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment clean up, update for bug 669829; 41 words added, 3 words removed

Revision Content

{{ obsolete_header() }}

{{ gecko_callout_heading("9.0") }}

Starting in Gecko 9.0 {{geckoRelease("9.0"))), atlbase.h is no longer needed, since support for ActiveX has been removed.

This page is linked from the build system. Do not remove it without making sure it links to useful information for building Firefox 3.

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

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.

Unfortunately, the Windows 7 SDK is required to build Mozilla normally, because of dependencies on Vista and Windows 7-specific APIs. MozillaBuild 1.4 and above will allow you to use both the Windows 7 SDK and an older Platform SDK to work around this issue.

You should restart start-msvcX.bat after installing the Windows 2003 SDK.

Note: If you encounter an error that atlbase.h cannot be found and you have installed Visual Studio 10 Express together with the platform SDK, you may have to delete a registry entry so that guess-msvc.bat doesn't detect VC10 installed. The key is HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC.

Disable code that uses ATL

ATL is used by only a small portion of our codebase. You should be able to disable these features and do a build without ATL. To disable ATL, add the line below to the .mozconfig file. On Windows XP, this may be located in C:\Documents and Settings\(your user name). If the file does not exist, create it.

ac_add_options --disable-accessibility
Note: Note that xpconnect-idispatch and ActiveX features (that are off by default) rely on atlbase.h as well, so you should not turn those on unless atlbase.h is present.
Note: Some versions of atlbase.h add atlthunk.lib to the list of default libraries. The mozillabuild environment provides a compatible version of atlthunk.lib for you.

Revision Source

<p>{{ obsolete_header() }}</p>
<div class="geckoVersionNote" style="undefined"> <p>{{ gecko_callout_heading("9.0") }}</p> <p>Starting in Gecko 9.0 {{geckoRelease("9.0"))), <code>atlbase.h</code> is no longer needed, since support for ActiveX has been removed.</p>
</div>
<p><span class="comment">This page is linked from the build system. Do not remove it without making sure it links to useful information for building Firefox 3.</span></p>
<p><code>atlbase.h</code> is a header file which is provided by the Microsoft Active Template Library.</p>
<p>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:</p>
<h4 name="Use_the_Professional_Version_of_Microsoft_Visual_C.2B.2B">Use the Professional Version of Microsoft Visual C++</h4>
<p>The professional version of Microsoft Visual C++ comes with ATL headers.</p>
<h4 name="Use_the_Windows_2003_SDK">Use the Windows 2003 SDK</h4>
<p>The Windows 2003 SDK is a <a class="external" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;displaylang=en" title="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;displaylang=en">free download</a> and is the last version of the Windows SDK to come with ATL headers.</p>
<p>NOTE: The Windows 2008 SDK, which the 2003 SDK page points you to, doesn't have the ATL headers.</p>
<div class="note">Unfortunately, the Windows 7 SDK is required to build Mozilla normally, because of dependencies on Vista and Windows 7-specific APIs. MozillaBuild 1.4 and above will allow you to use both the Windows 7 SDK and an older Platform SDK to work around this issue.</div>
<p>You should restart <code>start-msvcX.bat</code> after installing the Windows 2003 SDK.</p>
<div class="note"><strong>Note:</strong> If you encounter an error that <code>atlbase.h</code> cannot be found and you have installed Visual Studio 10 Express together with the platform SDK, you may have to delete a registry entry so that <code>guess-msvc.bat</code> doesn't detect VC10 installed. The key is <code>HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VC</code>.</div>
<h4 name="Disable_code_that_uses_ATL">Disable code that uses ATL</h4>
<p>ATL is used by only a small portion of our codebase. You should be able to disable these features and do a build without ATL. To disable ATL, add the line below to the <code>.mozconfig</code> file. On Windows XP, this may be located in <code>C:\Documents and Settings\(your user name)</code>. If the file does not exist, create it.</p>
<pre class="eval">ac_add_options --disable-accessibility
</pre>
<div class="note"><strong>Note:</strong> Note that xpconnect-idispatch and ActiveX features (that are off by default) rely on <code>atlbase.h</code> as well, so you should not turn those on unless <code>atlbase.h</code> is present.</div>
<div class="note"><strong>Note:</strong> Some versions of <code>atlbase.h</code> add <code>atlthunk.lib</code> to the list of default libraries. The mozillabuild environment provides a compatible version of <code>atlthunk.lib</code> for you.</div>
Revert to this revision