Visual Studio 2008 64-bit Builds

patricksnape's Avatar

patricksnape

28 Mar, 2016 09:37 AM

Hi,

Visual Studio 2008 requires a bit of hand-holding to get 64-bit builds to work properly. This is particularly important for CMake when trying to use the "Visual Studio 2008 Win64" generator.

In order to allow CMake to find Visual Studio 2008 (64-bit) configurations, the following steps must be taken:

Run the following commands:

regedit /s x64\VC_OBJECTS_PLATFORM_INFO.reg

regedit /s x64\600dd186-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\600dd187-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\600dd188-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\600dd189-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\656d875f-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\656d8760-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\656d8763-2429-11d7-8bf6-00b0d03daa06.reg
regedit /s x64\656d8766-2429-11d7-8bf6-00b0d03daa06.reg

copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\AMD64.VCPlatform.config" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\AMD64.VCPlatform.Express.config"
copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\Itanium.VCPlatform.config" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\Itanium.VCPlatform.Express.config"

where the corresponding REG files are given in this ZIP: https://github.com/menpo/condaci/blob/master/vs2008_patch.zip. The commands above can be run automatically be executing the setup_x64.bat file inside that ZIP.

Finally, copy the following file:

copy C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat

Making sure that the C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64 folder exists.

This will allow CMake to find the VS2008 64-bit generator.

Would it be possible to set this up on Appveyor?

Cheers,

Patrick

  1. Support Staff 1 Posted by Feodor Fitsner on 28 Mar, 2016 06:18 PM

    Feodor Fitsner's Avatar

    You can download the zip and run that setup_x64.bat as part of you build? It should take seconds to complete. We'd prefer to keep VM images as much standard as possible.

  2. 2 Posted by patricksnape on 29 Mar, 2016 05:41 AM

    patricksnape's Avatar

    Yes we can run it manually - in fact, within that repo that I linked to is our build script and I am already running this process manually for that project. However, I just figured that anybody that tries to build using Visual Studio 2008 and wants an x64 build will have this problem - at least this post stands as an example for them to fix it!

    Thanks a lot!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac