[Insight-users] compiling on windows 7 64bit
Jan Margeta
jmargeta at gmail.com
Tue Jan 8 11:41:28 EST 2013
Hi Leila,
Unless you want to compile ITK with Python 2.7 wrapping, you might want to
consider using the latest Visual studio Express for Windows Desktop (
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop)
which comes with a 64bit compiler out of the box.
It can compile easily ITK (except for itkAnchorCloseImageFilter.h
http://review.source.kitware.com/#/c/9233/).
Best,
Jan
On Tue, Jan 8, 2013 at 5:25 PM, Matt McCormick
<matt.mccormick at kitware.com>wrote:
> Hi Leila,
>
> It is a hairy process. Here are my notes:
>
> This page describes how to install 64-bit amd64 binary generation for
> Microsoft Visual Studio 2008 Express. By default, it only supports
> 32-bit x86 binaries.
>
> == Step 1: Install Visual Studio ==
>
> Install [http://www.microsoft.com/en-us/download/details.aspx?id=14597
> Visual Studio 2008 Express SP1].
>
> == Step 2: Install the Windows SDK ==
>
> Install [http://msdn.microsoft.com/en-us/windowsserver/ff851942 the
> Windows SDK]. Install the '''Windows SDK for Windows Server 2008 and
> .NET Framework 3.5''', i.e. SDK '''v6.0A'''. This is the version with
> the 2008 amd64 compilers.
>
> == Step 3: Hack the registry ==
>
> The following was extracted from
> [
> https://github.com/enGits/engrid/wiki/Configure-Microsoft-Visual-Studio-2008-Express-to-also-build-for-Windows-x64
> this Github wiki page] on 2012-12-04.
>
> === Introduction ===
> Microsoft Visual Studio 2008 Express comes by default with only
> compilation and building capabilities for creating 32bit applications
> for Windows. It's this way (probably) because:
> # The Express editions are ''basic'' versions of the
> Professional/Standard editions of Visual Studio, but still pack the
> ''awesome power of debugging'' in Windows, as well as most of their
> optimization algorithms.
> # Since they are ''basic'' editions, they provide IDEs for each
> language in separate environments.
> # These ''basic'' editions are oriented to home users and small
> businesses who cannot afford to invest in a +500 USD application per
> workstation just to create a ''cheap'' application for Windows.
> # ...And this might also be a way for potential users to stay away
> from GNU Gcc and MinGW... as well as away from Linux and Mac OS X...
> but this might just be ''the paranoia talking''.
>
> (Side note: seems that MSVC 2010 doesn't have these problems...)
>
> Nonetheless, Microsoft does provide the tools for building 64bit
> applications, for both the x86_64 (AMD64) and Itanium (IA64)
> architectures! But the respective compilers only come included with
> the Windows SDK. And that SDK is tailored to work out-of-the-box with
> the Standard/Professional editions.
>
> Therefore, only the inquisitive minds will try and figure out how this
> can work for Express. For those, unofficial informations have been
> compiled here: [
> http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/
> "Visual C++ 2008 Express Edition And 64-Bit Targets" on "Jen's Blog"].
> It was based on that blog post that this wiki article has been written
> in a more ''wiki-way''.
>
> === Installation Instructions ===
> # Install the Windows SDK. It's available
> [http://www.microsoft.com/download/en/details.aspx?id=18950 here] -
> Download ISO for your windows machine: x86 (GRMSDK_EN_DVD.iso) or
> AMD64 (GRMSDKX_EN_DVD.iso). On older SDKs, both ISOs were necessary.
> # Open the Registry editor (<code>regedit.exe</code>).
> # Hack the necessary registry places:
> ## On Windows 32bit:
> ### Visit the key <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual
> Studio\9.0\CLSID</code> and export it to
> <code>sdk_data_clsid.reg</code>.
> ### Visit the key <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual
> Studio\9.0\VC</code> and export it to <code>sdk_data_vc.reg</code>.
> ### Visit the key
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress</code> and also
> export the file to <code>backup_msvc2008exp.reg</code>, this time to
> keep a backup.
> ### Edit the files <code>sdk_data_clsid.reg</code> and
> <code>sdk_data_vc.reg</code>, to replace all occurrences of
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Visual Studio</code> to
> <code>HKEY_CURRENT_USER\Software\Microsoft\VCExpress</code>. Save the
> files.
> ## On Windows 64bit:
> ### Visit the key
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual
> Studio\9.0\CLSID</code> and export it to
> <code>sdk_data_clsid.reg</code>.
> ### Visit the key
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual
> Studio\9.0\VC</code> and export it to <code>sdk_data_vc.reg</code>.
> ### Visit the key
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VCExpress</code>
> and also export the file <code>backup_msvc2008exp.reg</code>, this
> time to keep a backup.
> ### Edit the files <code>sdk_data_clsid.reg</code> and
> <code>sdk_data_vc.reg</code>, to replace all occurrences of
> <code>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Visual
> Studio</code> to
> <code>HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\VCExpress</code>.
> Save the files.
> # Import the files <code>sdk_data_clsid.reg</code> and
> <code>sdk_data_vc.reg</code>, either from <tt>Regedit</tt> or by
> double-clicking on the modified files.
> # Fix the broken <tt>config</tt> files:
> ## On Windows 32bit:
> ### Go to the folder <code>C:\Program Files\Microsoft Visual Studio
> 9.0\VC\vcpackages</code> and rename the file
> <code>AMD64.VCPlatform.config</code> to
> <code>AMD64.VCPlatform.Express.config</code>.
> ## On Windows 64bit:
> ### Go to the folder <code>C:\Program Files (x86)\Microsoft Visual
> Studio 9.0\VC\vcpackages</code> and rename the file
> <code>AMD64.VCPlatform.config</code> to
> <code>AMD64.VCPlatform.Express.config</code>.
> ### The following steps don't seem to be always necessary. Check the
> next section first, to see if it works. If not, come back to this
> point.<br>Recover broken DLL files:
> #### Visit the DVD/Installer from where you installed Windows SDK and
> open the file <code>Setup\vc_stdx86.cab</code>.
> #### Copy the file <code>FL_VCProjectAMD64Platform_dll_*</code> from
> inside <code>Setup\vc_stdx86.cab</code> to a temporary folder.
> #### Rename the copy to <code>VCProjectAMD64Platform.dll</code>.
> #### Now copy this file to the folder <code>C:\Program Files
> (x86)\Microsoft Visual Studio 9.0\VC\vcpackages</code>.
>
> <br>
> Modifications are now complete. You may now start MSVC2008 Express
> once again and open/start a new project.
>
> HTH,
> Matt
>
> On Tue, Jan 8, 2013 at 8:26 AM, John Drescher <drescherjm at gmail.com>
> wrote:
> > On Tue, Jan 8, 2013 at 10:24 AM, Leila Baghdadi
> > <baghdadi at phenogenomics.ca> wrote:
> >> thank you!
> >>
> >
> > You are welcome.
> > I guess all you need from the previous link is:
> >
> > "64-bit tools are not available on Visual C++ Express by default. To
> > enable 64-bit tools on Visual C++ Express, install the Windows
> > Software Development Kit (SDK) in addition to Visual C++ Express.
> > Otherwise, an error occurs when you attempt to configure a project to
> > target a 64-bit platform using Visual C++ Express."
> >
> > John
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130108/e7bb9ed5/attachment.htm>
More information about the Insight-users
mailing list