[Insight-users] Building WrapITK with VS2008 Express SP1 on win32 / gccxml issues

Pierre Raybaut contact at pythonxy.com
Sun Sep 13 12:05:24 EDT 2009


Hi all,

Thanks to Charl Botha (thanks a lot Charl!), I was able today to build 
WrapITK on Windows 32bits with the following:
    - official v3.14 ITK and CableSwig packages
    - CMake 2.6
    - Visual Studio 2008 Express Edition SP1
    - Python 2.6

Unfortunately, due to an uncomplete compiler detection in CableSwig, 
building WrapITK was impossible with the official packages (ITK + 
CableSwig 3.14).
I had to change some code in 
CableSwig-ITK-3.14.0\GCC_XML\VcInstall\vcInstall.cxx to help CableSwig 
detecting my compiler. Actually, gccxml does not support VS2008 Express 
SP1 in its current implementation (VS2008, VS2008 SP1 and VS2008 Express 
are apparently supported).

With the changes below, building CableSwig v3.14 then ITK/WrapITK v3.14 
using the CMake-generated Visual Studio solution works like a charm.

So here are the changes I've made (it's ugly, but it works):
  const char* vc9Registry =
    "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir";
  //"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir";
  
//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\9.0;InstallDir"; 
// _WIN64 ?
  const char* vc9sp1Registry[] =
  {
    // English SP1
    
//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\InstalledProducts\\KB948484;",
    
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\InstalledProducts\\KB945282;",
    0
  };
  const char* vc9exRegistry =
    
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\XXXVCExpress\\9.0;InstallDir";  
// I changed this key to prevent gccxml from detecting a "VC9 without 
SP1" install
  //"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir";
  
//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\9.0;InstallDir"; 
// _WIN64 ?

If it can help, here are the registry keys for a VS2008 Express SP1 
installation (English):
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB945282]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB945282)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB946040]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB946040)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB946308]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB946308)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB947540]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB947540)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB947789]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB947789)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\KB948127]
@="Hotfix for Microsoft Visual C++ 2008 Express Edition with SP1 - ENU 
(KB948127)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\9.0\InstalledProducts\Microsoft 
Visual C++]
"UseInterface"=dword:00000001
"Package"="{F1C25864-3097-11D2-A5C5-00C04F7968B4}"
"DefaultProductAttribute"="VC"

Hoping that future CableSwig implementation will take this into account.
Cheers,
Pierre


More information about the Insight-users mailing list