mozilla

Revision 320217 of Windows SDK versions

  • Revision slug: Windows_SDK_versions
  • Revision title: Windows SDK versions
  • Revision id: 320217
  • Created:
  • Creator: Jonathan_Watt
  • Is current revision? No
  • Comment Add info for Visual Studio 2012

Revision Content

Mozilla, from time to time, might support building against multiple versions of the Windows SDK as a compatibility/transitional measure. If it does, several features will be disabled if you build with an SDK older than the default, which means that you'll have to specify a non-default SDK version explicitly.

Help! I know I have the correct SDK, but configure.in's still failing!

Try the following things in order:

  1. Run the Windows SDK Configuration Tool (if available) and make sure the right SDK is selected.
  2. Restart the msys console.
  3. Delete your entire object directory and start over.

Quick start

Follow the instructions for whichever version of Visual C++ you're using.

Visual Studio Professional 2012

Windows SDK not required.

Visual Studio 2012 Express for Windows Desktop

???

Visual C++ 10 (VS2010) Professional

This comes with the Windows 7 SDK, so you should be all set out of the box.

Visual C++ 10 (VS2010) Express

Download and install the Windows 7 SDK.

Visual C++ 9 (VS2008) Professional/Express

Download and install the Windows 7 SDK. Note that you need Service Pack 1 -- for the Express edition it is a separate download.

Visual C++ 8 (VS2005) Professional

  1. Download and install the Windows 7 SDK.
  2. Install this Microsoft hotfix to allow linking to work correctly.

Visual C++ 7.1 or Visual C++ 8 (VS2005) Express

These versions are not supported and the Windows 7 SDK will not work with them. You need to upgrade to one of the newer Visual C++ versions above.

For Gecko 11 or below: you could also download the Windows Vista SDK and follow the instructions there to allow you to build against it.

Windows 7 SDK

{{ gecko_callout_heading("12.0") }}

Starting Gecko 12.0, this SDK is necessary.

This is the SDK that official builds are built against. Features that depend on this SDK include:

  • Windows 7 taskbar previews
  • Windows 7 download taskbar progress
  • Windows 7 jump lists

You can download the SDK (v7.0 or unsupported v7.1 [web setup or ISO image]) from the Microsoft Download Center. Note that if you're running a 64 bit version of Windows you may require the "AMD" version of the SDK even if you have an Intel processor, and you may need to deselect the documentation component in the installer in order to avoid an installation error. (This was certainly the case for 64 bit Windows 7 on a late 2008 MacBook Pro.)

Warning: Due to a bug in Windows 7 SDK, if you get "SDKSETUP encountered an error: Expecting path %SystemRoot% to represent a valid system volume" error you may require to set environmental variable %windir% to something like "C:\Windows" instead of "%SystemRoot%".
Warning: Due to a bug in old versions of MozillaBuild (prior to 1.6), if you download version 7.1 of the Windows 7 SDK (which is the current version available), your build will fail, often while building cairo with "ocidl.h" errors.  In order to fix this issue, you need to use the latest version of MozillaBuild.
Note: While this configuration will probably build on mozilla-1.9.1 and mozilla-1.9.0, it is not supported. 

Windows Vista SDK

{{ obsolete_header("12.0") }}

This is the SDK that mozilla-1.9.1 (Firefox 3.5) builds used to be built against. Features that depend on this SDK include:

  • Windows Vista parental controls
  • File associations and application registration on Vista and above
  • Ability to display the UAC shield icon in the UI
  • Thunderbird Windows Search integration
  • Text Services Framework support

There are two ways to obtain it:

  1. Download the Windows Vista SDK from the Microsoft Download Center.
    • You may choose not to install the Sample Code and Documentation to save space and download time.
    • If you are using Windows XP, you must have Windows XP Service Pack 2 and .NET Framework 2.0 installed before installing the Vista SDK.
  2. Use Visual Studio 2008 Professional.

Gecko 1.9.2 through 11: If you would like to use this SDK, add ac_add_options --with-windows-version=600 to your .mozconfig.

Windows Server 2003 R2 Platform SDK

{{ obsolete_header("12.0") }}

This is your only option if you're on Windows 2000. This also used to be necessary for building a default Gecko 1.9.2 through 8 with Visual C++ Express editions (see atlbase.h for more).

You can download the SDK from the Microsoft Download Center.

  • You need to install at least the "Windows Core SDK", "Web Workshop (IE) SDK", and the "Data Access Services (MDAC) SDK".
  • For all SDKs, you may choose not to install Sample Code and Documentation to save space and download time.

Gecko 1.9.2 through 11: If you're building with this SDK, you will need to add ac_add_options --with-windows-version=502 to your .mozconfig.

For mozilla-1.9.1 and mozilla-1.9.0, you need to add ac_add_options --disable-vista-sdk-requirements to your .mozconfig instead.

Unsupported SDKs

The Windows SDK for Windows Server 2008 is not supported, and has been found to cause the following problems:

  • breaks the vcvars32.bat file from Visual Studio 2008
  • no longer sets the correct PATH for the .NET framework
  • causes an invalid PATH which breaks the Mozilla build

If you have the Windows Server 2008 SDK installed, uninstall it. The SDK will break builds even if you try to use other SDKs.

Other possible workarounds:

  • use another SDK (the one shipped with Visual Studio 9)
  • delete the vcvars32.bat file and repair your Visual Studio installation with the setup program
  • edit vcvars32.bat to correct the problem (see http://blogs.msdn.com/windowssdk/arc...vironment.aspx "Workaround: Repair the VS2008 command line build environment by editing c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat manually").

SDKs older than the Server 2003 R2 Platform SDK aren't supported either.

Revision Source

<p>Mozilla, from time to time, might support building against multiple versions of the Windows SDK as a compatibility/transitional measure. If it does, several features will be disabled if you build with an SDK older than the default, which means that you'll have to specify a non-default SDK&nbsp;version explicitly.</p>
<h4 id="Help!_I_know_I_have_the_correct_SDK.2C_but_configure.in's_still_failing!"><strong>Help! I know I have the correct SDK, but configure.in's still failing!</strong></h4>
<p>Try the following things in order:</p>
<ol>
  <li>Run the Windows SDK Configuration Tool (if available) and make sure the right SDK is selected.</li>
  <li>Restart the msys console.</li>
  <li>Delete your entire object directory and start over.</li>
</ol>
<h2 id="Quick_start">Quick start</h2>
<p>Follow the instructions for whichever version of Visual C++ you're using.</p>
<h3>Visual Studio Professional 2012</h3>
<p>Windows SDK not required.</p>
<h3>Visual Studio 2012 Express for Windows Desktop</h3>
<p>???</p>
<h3 id="Visual_C.2B.2B_10_(VS2010)_Professional">Visual C++ 10 (VS2010) Professional</h3>
<p>This comes with the Windows 7 SDK, so you should be all set out of the box.</p>
<h3 id="Visual_C.2B.2B_10_(VS2010)_Express">Visual C++ 10 (VS2010) Express</h3>
<p>Download and install the&nbsp;<a href="#Windows_7_SDK">Windows 7 SDK</a>.</p>
<h3 id="Visual_C.2B.2B_9_(VS2008)_Professional.2FExpress">Visual C++ 9 (VS2008) Professional/Express</h3>
<p>Download and install the <a href="#Windows_7_SDK">Windows 7 SDK</a>. Note that you need Service Pack 1 -- for the Express edition it is a <a class="external" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;displaylang=en" title="http://www.microsoft.com/downloads/details.aspx?FamilyId=F3FBB04E-92C2-4701-B4BA-92E26E408569&amp;displaylang=en">separate download</a>.</p>
<h3 id="Visual_C.2B.2B_8_(VS2005).C2.A0Professional">Visual C++ 8 (VS2005)&nbsp;Professional</h3>
<ol>
  <li>Download and install the <a href="#Windows_7_SDK">Windows 7 SDK</a>.</li>
  <li>Install this <a class="external" href="http://support.microsoft.com/kb/949009/" title="http://support.microsoft.com/kb/949009/">Microsoft hotfix</a> to allow linking to work correctly.</li>
</ol>
<h3 id="Visual_C.2B.2B_7.1_or_Visual_C.2B.2B_8_(VS2005)_Express">Visual C++ 7.1 or Visual C++ 8 (VS2005) Express</h3>
<p>These versions are <strong>not supported </strong>and the Windows 7 SDK will not work with them. You need to upgrade to one of the newer Visual C++ versions above.</p>
<p><strong>For Gecko 11 or below</strong>: you could also download the <a href="#Windows_Vista_SDK">Windows Vista SDK</a> and follow the instructions there to allow you to build against it.</p>
<h2 id="Windows_7_SDK">Windows 7 SDK</h2>
<div class="geckoVersionNote" style="undefined">
  <p>{{ gecko_callout_heading("12.0") }}</p>
  <p>Starting Gecko 12.0, this SDK is necessary.</p>
</div>
<p>This is the SDK&nbsp;that official builds are built against. Features that depend on this SDK&nbsp;include:</p>
<ul>
  <li>Windows 7 taskbar previews</li>
  <li>Windows 7 download taskbar progress</li>
  <li>Windows 7 jump lists</li>
</ul>
<p>You can download the SDK (<a class="external" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;displaylang=en">v7.0</a> or unsupported v7.1 [<a class="external" href="http://go.microsoft.com/fwlink/?LinkID=191420" title="http://go.microsoft.com/fwlink/?LinkID=191420">web setup</a> or <a class="external" href="http://go.microsoft.com/fwlink/?LinkID=191424" title="http://go.microsoft.com/fwlink/?LinkID=191424">ISO image</a>]) from the Microsoft Download Center. Note that if you're running a 64 bit version of Windows you may require the "AMD" version of the SDK even if you have an Intel processor, and you may need to <strong>de</strong>select the documentation component in the installer in order to avoid an installation error. (This was certainly the case for 64 bit Windows 7 on a late 2008 MacBook Pro.)</p>
<div class="warning">
  <strong>Warning:</strong> Due to a bug in Windows 7 SDK, if you get "SDKSETUP encountered an error: Expecting path %SystemRoot% to represent a valid system volume" error you may require to set environmental variable %windir% to something like "C:\Windows" instead of "%SystemRoot%".</div>
<div class="warning">
  <strong>Warning:</strong> Due to a bug in old versions of MozillaBuild (prior to 1.6), if you download version 7.1 of the Windows 7 SDK (which is the current version available), your build <strong>will</strong> fail, often while building cairo with "ocidl.h" errors.&nbsp; In order to fix this issue, you need to use the latest version of MozillaBuild.</div>
<div class="note">
  <strong>Note:</strong> While this configuration will probably build on mozilla-1.9.1 and mozilla-1.9.0, it is not supported.&nbsp;</div>
<h2 id="Windows_Vista_SDK">Windows Vista SDK</h2>
<p>{{ obsolete_header("12.0") }}</p>
<p>This is the SDK&nbsp;that mozilla-1.9.1 (Firefox 3.5) builds used to be built against. Features that depend on this SDK&nbsp;include:</p>
<ul>
  <li>Windows Vista parental controls</li>
  <li>File associations and application registration on Vista and above</li>
  <li>Ability to display the UAC shield icon in the UI</li>
  <li>Thunderbird Windows Search integration</li>
  <li>Text Services Framework support</li>
</ul>
<p>There are two ways to obtain it:</p>
<ol>
  <li>Download the <a class="external" href="http://www.microsoft.com/downloads/details.aspx?familyid=4377F86D-C913-4B5C-B87E-EF72E5B4E065&amp;displaylang=en" title="http://www.microsoft.com/downloads/details.aspx?familyid=4377F86D-C913-4B5C-B87E-EF72E5B4E065&amp;displaylang=en">Windows Vista SDK</a> from the Microsoft Download Center.
    <ul>
      <li>You may choose not to install the Sample Code and Documentation to save space and download time.</li>
      <li>If you are using Windows XP, you must have <a class="external" href="http://www.microsoft.com/windowsxp/sp2/default.mspx" rel="external nofollow" target="_blank" title="http://www.microsoft.com/windowsxp/sp2/default.mspx">Windows XP Service Pack 2</a> and <a class="external" href="http://www.microsoft.com/downloads/info.aspx?na=47&amp;p=3&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=4377f86d-c913-4b5c-b87e-ef72e5b4e065&amp;u=details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&amp;displaylang=en" rel="external nofollow" target="_blank" title="http://www.microsoft.com/downloads/info.aspx?na=47&amp;p=3&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=4377f86d-c913-4b5c-b87e-ef72e5b4e065&amp;u=details.aspx%3ffamilyid%3d0856EACB-4362-4B0D-8EDD-AAB15C5E04F5%26displaylang%3den">.NET Framework 2.0</a> installed before installing the Vista SDK.</li>
    </ul>
  </li>
  <li>Use Visual Studio 2008 Professional.</li>
</ol>
<p><strong>Gecko 1.9.2 through 11: </strong>If you would like to use this SDK, add <code>ac_add_options --with-windows-version=600</code> to your .mozconfig.</p>
<h2 id="Windows_Server_2003_R2_Platform_SDK">Windows Server 2003 R2 Platform SDK</h2>
<p>{{ obsolete_header("12.0") }}</p>
<p>This is your only option if you're on Windows 2000. This also used to be necessary for building a default <strong>Gecko 1.9.2 through 8</strong> with Visual C++ Express editions (see <a href="/en/atlbase.h" title="atlbase.h">atlbase.h</a> for more).</p>
<p>You can <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">download the SDK</a>&nbsp;from the Microsoft Download Center.</p>
<ul>
  <li>You need to install at least the "Windows Core SDK", "Web Workshop (IE) SDK", and the "Data Access Services (MDAC) SDK".</li>
  <li>For all SDKs, you may choose not to install Sample Code and Documentation to save space and download time.</li>
</ul>
<p><strong>Gecko 1.9.2 through 11: </strong>If you're building with this SDK, you will need to add <code>ac_add_options --with-windows-version=502</code> to your .mozconfig.</p>
<div class="note">
  For mozilla-1.9.1 and mozilla-1.9.0, you need to add <code>ac_add_options --disable-vista-sdk-requirements</code> to your .mozconfig instead.</div>
<h2 id="Unsupported_SDKs">Unsupported SDKs</h2>
<p>The Windows SDK for Windows Server 2008 is not supported, and has been found to cause the following problems:</p>
<ul>
  <li>breaks the vcvars32.bat file from Visual Studio 2008</li>
  <li>no longer sets the correct PATH for the .NET framework</li>
  <li>causes an invalid PATH which breaks the Mozilla build</li>
</ul>
<p><strong>If you have the Windows Server 2008 SDK installed, uninstall it. The SDK will break builds even if you try to use other SDKs.</strong></p>
<p>Other possible workarounds:</p>
<ul>
  <li>use another SDK (the one shipped with Visual Studio 9)</li>
  <li>delete the vcvars32.bat file and repair your Visual Studio installation with the setup program</li>
  <li>edit vcvars32.bat to correct the problem (see <a class="external" href="http://blogs.msdn.com/windowssdk/archive/2008/04/18/installing-win-sdk-for-svr-2008-after-vs-2008-breaks-vs-command-line-build-environment.aspx" rel="freelink">http://blogs.msdn.com/windowssdk/arc...vironment.aspx</a> "Workaround: Repair the VS2008 command line build environment by editing c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat manually").</li>
</ul>
<p>SDKs older than the Server 2003 R2 Platform SDK&nbsp;aren't supported either.</p>
Revert to this revision