Difference between revisions of "Hugin SDK (MSVC 2008)"

From PanoTools.org Wiki
Jump to navigation Jump to search
(How to build Hugin Software Development Kit with MSVC 2008)
 
Line 16: Line 16:
  
 
{| class="wikitable"
 
{| class="wikitable"
|-valign="top"
+
|-
 
! Tool
 
! Tool
 
! Description
 
! Description
Line 43: Line 43:
  
 
{| class="wikitable"
 
{| class="wikitable"
|-valign="top" align="left"
+
|-
 
! Directory
 
! Directory
 
! Description (Website)<br/>Download package (Date of the package)
 
! Description (Website)<br/>Download package (Date of the package)
Line 231: Line 231:
 
<tt><SDKHOME>\wxWidgets-2.8.9\lib\vc_lib</tt>
 
<tt><SDKHOME>\wxWidgets-2.8.9\lib\vc_lib</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 +
|-
 +
!style="text-align:left"|Note
 
|-
 
|-
! Note
+
|During build process temporary object files are stored in following directories
|-valign="top" align="left"
 
|<ul>
 
<li>During build process temporary object files are stored in following directories
 
 
<ul>
 
<ul>
 
<li><tt><SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswu</tt></li>
 
<li><tt><SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswu</tt></li>
 
<li><tt><SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswud</tt></li>
 
<li><tt><SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswud</tt></li>
 
</ul>
 
</ul>
Both directories may be deleted to save disc space.</li>
+
Both directories may be deleted to save disc space.
</ul>
 
 
|}
 
|}
  
Line 286: Line 284:
 
<tt><SDKHOME>\boost_1_38_0\stage\lib</tt>
 
<tt><SDKHOME>\boost_1_38_0\stage\lib</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valign="top"
+
|-
! Notes
+
!style="text-align:left"|Notes
 
|-
 
|-
 
|<ul>
 
|<ul>
Line 466: Line 464:
  
 
{| class="wikitable"
 
{| class="wikitable"
|-valign="top" align="left"
+
|-valign="top"
 
! Source
 
! Source
 
! Destination
 
! Destination
 
|-
 
|-
| <SDKHOME>\exiv2-0.18\msvc\bin\Debug\exiv2.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\bin\Debug\exiv2.lib</tt>
| <SDKHOME>\exiv2-0.18\msvc\lib\exiv2d.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\lib\''exiv2d''.lib</tt>
 
|-
 
|-
| <SDKHOME>\exiv2-0.18\msvc\bin\Release\exiv2.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\bin\Release\exiv2.lib</tt>
| <SDKHOME>\exiv2-0.18\msvc\lib\exiv2.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\lib\exiv2.lib</tt>
 
|-
 
|-
| <SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib
+
| <tt><SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib</tt>
| <SDKHOME>\exiv2-0.18\msvc\lib\libexpatd.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\lib\''libexpatd''.lib</tt>
 
|-
 
|-
| <SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib
+
| <tt><SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib</tt>
| <SDKHOME>\exiv2-0.18\msvc\lib\libexpat.lib
+
| <tt><SDKHOME>\exiv2-0.18\msvc\lib\''libexpat''.lib</tt>
 
|}
 
|}
 
</li>
 
</li>
Line 493: Line 491:
 
<tt><SDKHOME>\exiv2-0.18\msvc\lib</tt>
 
<tt><SDKHOME>\exiv2-0.18\msvc\lib</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valign="top" align="left"
+
|-
! Note
+
!style="text-align:left"|Note
 
|-
 
|-
|<ul>
+
|The code pattern in <tt>exv_msvc.h</tt> must be deleted to disable auto-linking of zlib library, because the compression library wxzlib of wxWidgets is used here.
<li>The code pattern in <tt>exv_msvc.h</tt> must be deleted to disable auto-linking of zlib library, because the compression library wxzlib of wxWidgets is used here.</li>
 
</ul>
 
 
|}
 
|}
  
Line 522: Line 518:
 
<tt><SDKHOME>\glew\lib</tt>
 
<tt><SDKHOME>\glew\lib</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valign="top" align="left"
+
|-
! Note
+
!style="text-align:left"|Note
 
|-
 
|-
|<ul>
+
|The GLEW include files are typically included by a statement like<br/><tt>#include "GL/glew.h"</tt><br/>therefore the base directory of the GLEW include files is <tt><SDKHOME>\glew\include</tt>
<li>The GLEW include files are typically included by a statement like<br/>
 
<tt>#include "GL/glew.h"</tt><br/>
 
therefore the base directory of the GLEW include files is <tt><SDKHOME>\glew\include</tt>
 
</li>
 
</ul>
 
 
|}
 
|}
  
Line 579: Line 570:
 
"<tt><SDKHOME>\libpano\pano13\Release LIB CMD</tt>"
 
"<tt><SDKHOME>\libpano\pano13\Release LIB CMD</tt>"
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valigen="top" align="left"
+
|-
! Note
+
!style="text-align:left"|Note
 
|-
 
|-
|<ul>
+
|The applications have to be build in release version only. Therefore only pano13 library has to be built in Debug configuration.
<li>The applications have to be build in release version only. Therefore only pano13 library is built in Debug configuration</li>
 
</ul>
 
 
|}
 
|}
  
Line 622: Line 611:
 
<tt><SDKHOME>\libxml2-2.7.3\win32\bin.msvc</tt>
 
<tt><SDKHOME>\libxml2-2.7.3\win32\bin.msvc</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valign="top" align="left"
+
|-
! Note
+
!style="text-align:left"|Notes
 
|-
 
|-
 
|<ul>
 
|<ul>
Line 690: Line 679:
 
<tt><SDKHOME>\autopano-sift-C\shared</tt>
 
<tt><SDKHOME>\autopano-sift-C\shared</tt>
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
|-valign="top" align="left"
+
|-
! Note
+
!style="text-align:left"|Note
 
|-
 
|-
|<ul>
+
|To save disc space you may delete all files and directories in <tt><SDKHOME>\autopano-sift-C</tt>, except the sub-directories <tt>bin</tt> and <tt>shared</tt>.
<li>To save disc space you may delete all files and directories in <tt><SDKHOME>\autopano-sift-C</tt>, except the sub-directories <tt>bin</tt> and <tt>shared</tt>.</li>
 
</ul>
 
 
|}
 
|}
  
[[User:Guido|Guido]] 01:31, 28 February 2009 (CET)
+
[[User:Guido|Guido]] 11:54, 28 February 2009 (CET)
  
 
[[Category:Software:Hugin]]
 
[[Category:Software:Hugin]]
 
[[Category:Software:Platform:Windows]]
 
[[Category:Software:Platform:Windows]]

Revision as of 12:54, 28 February 2009

Hugin depends on different components like libraries and tools, which are not available on a common Windows system. All these components can be combined to a Hugin Software Developmant Kit (SDK). This article gives step-by-step instructions to build such SDK for Hugin using Microsoft Visual C++ 2008 (MSVC 2008) Express Edition and precompiled dependencies.

First of all an overview is given over the contents of the SDK and the tools that are necessary to build the SDK.

The build steps for each component are written like a walkthrough and annotated on the end of each section.

Maybe some of the described tools and packages, especially those fetched from Subversion (SVN) repository, will change over time and/or become obsolete. Hence it is likely that some steps will become invalid or won't work any more.

The SDK is structured, that each component is located in its own sub-directory. This approach is different to other platforms like Linux, where some common directories are available to store include files, libraries and applications. The files of a component are spread over all these directories. Both approaches to structure the files in a file system have its assets and drawbacks.

The base directory of the SDK is denoted as <SDKHOME> in this article. Replace this by the directory where you store the SDK on your system. In the examples <SDKHOME> is replaced by the directory name D:\usr\src\SDK.

Prerequisites

To build the SDK some tools are required that are listed in the table below. Download the tools and install them. The destination directory of each tool is arbitrary. If you are uncertain, choose the default given in the setup dialog of each tool.

Tool Description
Microsoft Visual C++ 2008 Express Edition
Visit Download page
Compiler, Debugger and IDE
CMake 2.6.3 (2009-02-23)
Visit Download page or download cmake-2.6.3-win32-x86.exe
Generator of solution and project files for MSVC 2008
TortoiseSVN 1.5.8.15348 (2009-02-13)
Visit Download page or download TortoiseSVN-1.5.8.15348-win32-svn-1.5.5.msi
Tool to handle source codes in Subversion repositories
7-Zip 4.65 (2009-02-03)
Visit Download page or download 7z465.exe
Tool to decompress the source packages
Java SE Development Kit 6 Update 12
Visit Download page
Java Development Kit (JDK)

Contents of the Hugin SDK

For those who want to avoid to build the whole SDK from scratch a precompiled SDK is available: Download Hugin SDK (75 MiB, 2009-02-26)

The contents of the Hugin SDK is shown in the following table. Download the packages, except the packages fetched from Subversion repository.

Directory Description (Website)
Download package (Date of the package)
autopano-sift-C Autopano-SIFT-C (http://hugin.sourceforge.net/)
Subversion repository
https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk
boost_1_38_0 Boost C++ libraries 1.38.0 (http://www.boost.org/)
boost_1_38_0.7z (2009-02-09)
boost-jam-3.1.17-1-ntx86.zip (2008-11-29)
Deploy
OpenEXR
OpenEXR library 1.6.1 and IlmBase libraries 1.0.1 (http://www.openexr.com/)
ilmbase-1.0.1.tar.gz (2007-10-22)
openexr-1.6.1.tar.gz (2007-10-22)
enblend-enfuse-3.2 Enblend 3.2 and Enfuse 3.2 (http://enblend.sourceforge.net/)
enblend-enfuse-3.2.zip (2008-09-09)
exiftool ExifTool 7.69 (http://www.sno.phy.queensu.ca/~phil/exiftool)
exiftool-7.69.zip (2009-02-17)
exiv2-0.18 Exiv2 C++ library 0.18 (http://www.exiv2.org/)
exiv2-0.18.tar.gz (2008-12-18)
expat-2.0.1 Expat XML Parser library 2.0.1 (http://sourceforge.net/projects/expat/)
expat-2.0.1.tar.gz (2007-06-05)
gettext GNU gettext 0.13.1 and iconv library 1.9.1 (http://www.gnu.org/)
gettext-runtime-0.13.1.bin.woe32.zip (2004-01-20)
gettext-tools-0.13.1.bin.woe32.zip (2004-01-20)
libiconv/libiconv-1.9.1.bin.woe32.zip (2004-01-20)
glew OpenGL Extension Wrangler Library (GLEW) 1.5.1 (http://glew.sourceforge.net/)
glew-1.5.1-src.zip (2008-11-03)
libpano\pano13 pano13 library and applications of Panorama Tools (http://panotools.sourceforge.net/)
Subversion repository
https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano
libxml2-2.7.3 XML C parser and toolkit (http://www.xmlsoft.org/)
libxml2-sources-2.7.3.tar.gz (2009-01-18)
UnxUtils GNU utilities ported to win32 platform (http://sourceforge.net/projects/unxutils/)
UnxUtils.zip (2007-03-01)
wxWidgets-2.8.9 wxWidgets cross-platform GUI C++ framework 2.8.9 (http://www.wxwidgets.org/)
wxMSW-2.8.9.zip (2008-09-22)

In the following subsections each component is discussed in detail. The order of the subsections seems random, but I applied the appraoch to describe the precompiled packages first, followed by the big packages, where some of the small packages depend on.

The decompress step of each component contains seemingly inconsistent namings of destination directories, because in components a subdirectory is specified as destination directory and in some steps only the base directory. This is due to the fact that some package archives contain a base directory and some not. To check the right locations each result section of every component's description contains a summary of the expected files.

Enblend and Enfuse

  1. Decompress the file enblend-enfuse-3.2.zip to directory <SDKHOME>

Result

The applications are stored in <SDKHOME>\enblend-enfuse-3.2

ExifTool

  1. Create the directory <SDKHOME>\exiftool
  2. Decompress the file exiftool-7.69.zip to <SDKHOME>\exiftool
  3. Rename the file exiftool(-k).exe to exiftool.exe

Result

The application is stored in <SDKHOME>\exiftool

GetText

  1. Create the directory <SDKHOME>\gettext
  2. Decompress the following files to created directory <SDKHOME>\gettext
    • gettext-runtime-0.13.1.bin.woe32.zip
    • gettext-tools-0.13.1.bin.woe32.zip
    • libiconv-1.9.1.bin.woe32.zip

Result

The applications are stored in <SDKHOME>\gettext\bin

The include files are stored in <SDKHOME>\gettext\include

The libraries are stored in <SDKHOME>\gettext\lib

UnxUtils

  1. Create the directory <SDKHOME>\UnxUtils
  2. Decompress the file UnxUtils.zip to created directory <SDKHOME>\UnxUtils

Result

The applications are stored in <SDKHOME>\UnxUtils\bin and <SDKHOME>\UnxUtils\usr\local\wbin

wxWidgets

  1. Decompress the file wxMSW-2.8.9.zip to directory <SDKHOME>
  2. Rename the directory <SDKHOME>\wxMSW-2.8.9 to <SDKHOME>\wxWidgets-2.8.9
  3. Open the file <SDKHOME>\wxWidgets-2.8.9\include\wx\msw\setup.h
  4. Search for following line
    #define wxUSE_GLCANVAS       0
    

    and replace it by

    #define wxUSE_GLCANVAS       1
    
  5. Save the file
  6. Open the file <SDKHOME>\wxWidgets-2.8.9\src\jpeg\jpeglib.h
  7. Search for following line
    #include "../src/jpeg/jconfig.h"
    

    and replace it by

    #include "jconfig.h"
    
  8. Save the file
  9. Open the file <SDKHOME>\wxWidgets-2.8.9\src\tiff\tiffconf.h
  10. Search for following line
    #ifndef COMPRESSION_SUPPORT
    

    and extend it to

    #define TIF_PLATFORM_CONSOLE 1
    #ifndef COMPRESSION_SUPPORT
    #define ZIP_SUPPORT
    
  11. Save the file
  12. To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt
  13. On command prompt change directory to <SDKHOME>\wxWidgets-2.8.9\build\msw
    Example
    Setting environment for using Microsoft Visual Studio 2008 x86 tools.
    
    C:\Program Files\Microsoft Visual Studio 9.0\VC>d:
    
    D:\>cd \usr\src\SDK\wxWidgets-2.8.9\build\msw
    
    D:\usr\src\SDK\wxWidgets-2.8.9\build\msw>
    
  14. Enter each of the following two commands without any line break and press the Return key
    nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static
    nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static
    
  15. Close the Visual Studio command prompt window

Result

The include files are stored in <SDKHOME>\wxWidgets-2.8.9\include and its sub-directories

Additional Hugin depends on following files

  • <SDKHOME>\wxWidgets-2.8.9\src\jpg\*.h
  • <SDKHOME>\wxWidgets-2.8.9\src\jpg\jconfig.vc
  • <SDKHOME>\wxWidgets-2.8.9\src\png\*.h
  • <SDKHOME>\wxWidgets-2.8.9\src\tiff\*.h
  • <SDKHOME>\wxWidgets-2.8.9\src\zlib\*.h

The libraries are stored in <SDKHOME>\wxWidgets-2.8.9\lib\vc_lib

Note
During build process temporary object files are stored in following directories
  • <SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswu
  • <SDKHOME>\wxWidgets-2.8.9\build\msw\vc_mswud

Both directories may be deleted to save disc space.

Boost

  1. Decompress the file boost_1_38_0.7z to directory <SDKHOME>
  2. Decompress the file boost-jam-3.1.17-1-ntx86.zip to an arbitrary directory and copy the application bjam.exe to <SDKHOME>\boost_1_38_0
  3. To open a Windows command prompt choose Start > Run, then enter cmd.exe and click OK.
  4. On command prompt change directory to <SDKHOME>\boost_1_38_0
    Example
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Dokuments and Settings\Guido>d:
    
    D:\>cd \usr\src\SDK\boost_1_38_0
    
    D:\usr\src\SDK\boost_1_38_0>
    
  5. Enter the following command without line breaks and press Return key
    bjam --with-date_time --with-thread toolset=msvc variant=debug variant=release link=static threading=multi runtime-link=static stage
    

    After bjam.exe finished a statement like the following should be printed in the command prompt window

    ...updated 56 targets...
    
    d:\usr\src\SDK\boost_1_38_0>
    
  6. Close the Windows command prompt window

Result

The include files are stored in <SDKHOME>\boost_1_38_0 and its sub-directory boost

The libraries are stored in <SDKHOME>\boost_1_38_0\stage\lib

Notes
  • During build process temporary files are stored in <SDKHOME>\boost_1_38_0\bin.v2. This directory may be deleted.
  • Hugin needs only the two Boost libraries date_time and thread, thus only these two libraries have to be built.
    If you want to build all Boost libraries enter following command on the Windows command prompt instead of the command described above and press Return key.
    bjam -–build-type=complete toolset=msvc stage
    

    There are about 7GB disc space needed during build of all libraries (3.5GB for libraries and the same amount for the temporary files).

  • The Boost include files are often included by a statement like
    #include "boost/whatever.hpp"
    Therefore the base directory of the Boost include files is <SDKHOME>\boost_1_38_0
  • Only the following libraries are needed to build a release version of Hugin:
    • libboost_date_time-vc90-mt-s-1_38.lib
    • libboost_thread-vc90-mt-s-1_38.lib

    The files with "gd" in the filename, e.g. libboost_thread-vc90-mt-sgd-1_38.lib, are the debug libraries. The library files without "-1_38" suffix are automatically generated copies of the libraries with version suffix. They are used by CMake to detect the library directory.

OpenEXR

OpenEXR depends on following SDK component:

  • wxWidgets

Prepare this component before OpenEXR.

  1. Create the directory <SDKHOME>\OpenEXR
  2. Decompress the file ilmbase-1.0.1.tar.gz to created directory <SDKHOME>\OpenEXR
  3. Decompress the file openexr-1.6.1.tar.gz to the same directory <SDKHOME>\OpenEXR
    After decompress there should only exist the two directories ilmbase-1.0.1 and openexr-1.6.1 in <SDKHOME>\OpenEXR
  4. Open solution file <SDKHOME>\OpenEXR\ilmbase-1.0.1\vc\vc8\IlmBase\IlmBase.sln
    The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close
  5. Due to the fact that the Visual Studio solutions of OpenEXR are configured to build dynamic libraries, some modifications are necessary to build the required static libraries:
    For each project in Solution Explorer open the Property Pages dialog by choosing Project > Properties. Process the following steps for Debug and Release configuration. Some of the properties are not avaliable in every project, thus continue with next step.
    • Choose Configuration Properties > General. For Configuration Type property choose Static Library (.lib) if Dynamic Library (.dll) was selected.
    • Choose Configuration Properties > C/C++ > Preprocessor. In the Preprocessor Definitions entry remove defines OPENEXR_DLL, _USRDLL and *_EXPORTS (all with suffix _EXPORTS).
    • Choose Configuration Properties > C/C++ > Code Generation. For Runtime Library property choose Multithreaded-Debug (/MTd) in Debug configuration and Multithreaded (/MT) in Release configuration.
    • Choose Configuration Properties > C/C++ > Code Generation. For Enable Enhanced Instruction Set property choose Not Set.
    • Choose Configuration Properties > Build Events > Post-Build Event. In Command Line entry remove the createDLL command, but keep the install*.cmd command. For example in createDLL project only the statement "..\..\..\installCreateDLL.cmd $(IntDir)" should remain, in Half project only "..\..\..\installHalf.cmd $(IntDir)" etc.
  6. Close Property Pages dialog
  7. Select Debug in Solutions Configuration pull-down menu, and then choose Build > Build Solution
  8. Select Release in Solutions Configuration pull-down menu, and then choose Build > Build Solution
  9. Open solution file <SDKHOME>\OpenEXR\openexr-1.6.1\vc\vc8\OpenEXR\OpenEXR.sln
    The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close
  10. For project IlmImf do the same configuration property changes as in IlmBase solution described above
  11. Right-click IlmImf in Solution Explorer, and then choose Properties from shortcut menu
  12. In the Property Pages dialog do the following for Debug and Release configuration:
    • Choose Configuration Properties > C/C++ > General. In Additional Include Directory entry enter following additional include directory:
      ..\..\..\..\..\..\wxWidgets-2.8.9\src\zlib
      
  13. Choose Build > Batch Build
  14. Select Build for Project IlmImf with Solution Config "Debug|Win32" and "Release|Win32"
  15. Click Build
  16. Close Visual C++ 2008 Express Edition

Result

The include files are stored in <SDKHOME>\Deploy\include

The libraries are stored in <SDKHOME>\Deploy\lib\Debug and <SDKHOME>\Deploy\lib\Release

Expat

  1. Decompress the file expat-2.0.1.tar.gz to directory <SDKHOME>
  2. Open the file <SDKHOME>\expat-2.0.1\Source\expat.dsw
    A Visual C++ Project conversion dialog appears. Click "Yes To All".
  3. Choose Build > Batch Build
  4. Select Build for Project expat_static with Solution Config "Debug|Win32" and "Release|Win32"
  5. Click Build
  6. Close Visual C++ 2008 Express Edition

Result

The include files are stored in <SDKHOME>\expat-2.0.1\lib

The libraries are stored in <SDKHOME>\expat-2.0.1\win32\bin\Debug and <SDKHOME>\expat-2.0.1\win32\bin\Release

Exiv2

Exiv2 depends on following SDK components:

  • wxWidgets
  • GetText
  • Expat

Prepare these components before Exiv2.

  1. Decompress the file exiv2-0.18.tar.gz to directory <SDKHOME>
  2. Open the file <SDKHOME>\exiv2-0.18\src\exv_msvc.h
  3. Delete the following lines
    #if HAVE_LIBZ
      #define EXV_HAVE_LIBZ
      #if     EXV_HAVE_DLL
        #ifdef   _DEBUG
          #pragma comment(lib,"../../../zlib-1.2.3/projects/visualc6/Win32_DLL_Debug/zlib1d.lib")
        #else
          #pragma comment(lib,"../../../zlib-1.2.3/projects/visualc6/Win32_DLL_Release/zlib1.lib")
        #endif
      #else
        #ifdef   _DEBUG
          #pragma comment(lib,"../../../zlib-1.2.3/projects/visualc6/Win32_LIB_Debug/zlibd.lib")
        #else
          #pragma comment(lib,"../../../zlib-1.2.3/projects/visualc6/Win32_LIB_Release/zlib.lib")
        #endif
      #endif
      #define EXV_HAVE_LIBZ
      // assist VC7.1 to compile vsnprintf
      #if (_MSC_VER < 1400) && !defined(vsnprintf)
      #define vsnprintf _vsnprintf
      #endif
    #endif 
    
  4. Save the file
  5. Open solution file <SDKHOME>\exiv2-0.18\msvc\exiv2.sln
    The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed" and click Close
  6. Right-click exiv2lib in Solution Explorer, and then choose Properties from the shortcut menu
  7. In the Property Pages dialog do the following for Debug and Release configuration:
    • Choose Configuration Properties > C/C++ > General. In Additional Include Directories entry replace
      ../../../zlib-1.2.3
      

      by

      ../../../wxWidgets-2.8.9/src/zlib
      
  8. Close Property Pages dialog
  9. Choose Build > Batch Build
  10. Select Build for Project exiv2lib with Solution Config "Debug|Win32" and "Release|Win32"
  11. Click Build
  12. Close Visual C++ 2008 Express Edition
  13. Create the directory <SDKHOME>\exiv2-0.18\msvc\lib
  14. Copy the following files to this directory and rename them as specified in Destination column.
    Source Destination
    <SDKHOME>\exiv2-0.18\msvc\bin\Debug\exiv2.lib <SDKHOME>\exiv2-0.18\msvc\lib\exiv2d.lib
    <SDKHOME>\exiv2-0.18\msvc\bin\Release\exiv2.lib <SDKHOME>\exiv2-0.18\msvc\lib\exiv2.lib
    <SDKHOME>\expat-2.0.1\win32\bin\Debug\libexpatMT.lib <SDKHOME>\exiv2-0.18\msvc\lib\libexpatd.lib
    <SDKHOME>\expat-2.0.1\win32\bin\Release\libexpatMT.lib <SDKHOME>\exiv2-0.18\msvc\lib\libexpat.lib

Result

The include files are stored in <SDKHOME>\exiv2-0.18\msvc\include

The libraries are stored in <SDKHOME>\exiv2-0.18\msvc\lib

Note
The code pattern in exv_msvc.h must be deleted to disable auto-linking of zlib library, because the compression library wxzlib of wxWidgets is used here.

GLEW

  1. Decompress the file glew-1.5.1-src.zip to directory <SDKHOME>
  2. Open the file <SDKHOME>\glew\build\vc6\glew.dsw
    A Visual C++ Project conversion dialog appears. Click "Yes To All".
  3. Choose Build > Batch Build
  4. Select Build for Project glew_static with Solution Config "Debug|Win32" and "Release|Win32"
  5. Click Build
  6. Close Visual C++ 2008 Express Edition

Result

The include files are stored in <SDKHOME>\glew\include

The libraries are stored in <SDKHOME>\glew\lib

Note
The GLEW include files are typically included by a statement like
#include "GL/glew.h"
therefore the base directory of the GLEW include files is <SDKHOME>\glew\include

Panorama Tools

Panorama Tools depends on following SDK component:

  • wxWidgets

Prepare this component before Panoroma Tools.

  1. Set two windows environment variables:
    • Set variable WXWIDGETS_HOME to wxWidgets base folder <SDKHOME>\wxWindgets-2.8.9
    • Set variable JDK_HOME to Java SE Development Kit's destination directory name. This directory name was shown during the setup, e.g. C:\Program Files\Java\jdk1.6.0_12

    To take effect on changes of environment variables you may have to logout and login.

  2. Create the directory <SDKHOME>\libpano\pano13
  3. In explorer right-click on the created directory, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.
  4. In text feld "URL of repository" enter following address:
    https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano
    
  5. Click OK
  6. After checkout has finished click OK
  7. Open solution file <SDKHOME>\libpano\pano13\libpano.sln
    The Visual Studio Conversion Wizard dialog appears. Click Next, select option No, click Next and Finish. Unselect the option "Show the conversion log when the wizard is closed." and click Close
  8. Select "Debug LIB CMD" in Solution Configuration pull-down menu
  9. Select project pano13 in Solution Explorer, and then choose Build > Project Only > Build Only pano13
  10. Select "Release LIB CMD" in Solution Configuration pull-down menu, and then choose Build > Build Solution
  11. Close Visual C++ 2008 Express Edition

Result

The applications are stored in <SDKHOME>\libpano\pano13\tools\Release

The include files are stored in <SDKHOME>\libpano\pano13

The libraries are stored in "<SDKHOME>\libpano\pano13\Debug LIB CMD" and "<SDKHOME>\libpano\pano13\Release LIB CMD"

Note
The applications have to be build in release version only. Therefore only pano13 library has to be built in Debug configuration.

libxml2

  1. Decompress the file libxml2-sources-2.7.3.tar.gz to directory <SDKHOME>
  2. To open a Visual Studio command prompt choose Start > Programs > Microsoft Visual C++ 2008 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt
  3. On command prompt change directory to <SDKHOME>\libxml2-2.7.3\win32
    Example
    Setting environment for using Microsoft Visual Studio 2008 x86 tools.
    
    C:\Program Files\Microsoft Visual Studio 9.0\VC>d:
    
    D:\>cd \usr\src\SDK\libxml2-2.7.3\win32 
    
    D:\usr\src\SDK\libxml2-2.7.3\win32>
    

    Enter each of the following two commands without any line break and press the Return key.

    cscript configure.js ftp=no http=no iconv=no cruntime=/MT
    nmake -f makefile.msvc libxmla
    

Result

The include files are stored in <SDKHOME>\SDK\libxml2-2.7.3\include

The libraries are stored in <SDKHOME>\libxml2-2.7.3\win32\bin.msvc

Notes
  • During build process temporary object files are stored in the directory <SDKHOME>\libxml2-2.7.3\win32\int.a.msvc. This directories may be deleted to save disc space.
  • Hugin does not depend on this library, but autopano-sift-C. Therefore it is included in this SDK

autopano-sift-C

Autopano-SIFT-C depends on following SDK components:

  • libxml2
  • Panoramo Tools pano13 library
  • wxWidgets

Prepare these components before Autopano-SIFT-C.

  1. Create the directory <SDKHOME>\autopano-sift-C-trunk
  2. In explorer right-click on the created directory, and then choose SVN Checkout from the shortcut menu. The Checkout dialog appears.
  3. In text field "URL of repository" enter following address:
    https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk
    
  4. Click OK
  5. After checkout has finished click OK
  6. Start CMake (cmake-gui). The CMake dialog appears.
  7. In text field "Where is the source code" enter
    <SDKHOME>\autopano-sift-C-trunk
    
    Alternatively click Browse Source to point to this directory
  8. In text field "Where to build the binaries" enter
    <SDKHOME>\autopano-sift-C
    
  9. Click Configure
    If a dialog appears, which asks to create the build directoy, click Yes.
    A dialog appears, where you can specify the generator for the project.
  10. Select "Visual Studio 9 2008" and select option "Use default native compilers"
  11. Click Finish
    In the Name and Value list the entries are shown with red background.
  12. Click Configure
  13. Click Generate
  14. Close CMake
  15. Open solution file <SDKHOME>\autopano-sift-C\autopano-sift-C.sln
  16. Select Release in Solution Configuration pull-down menu, and then choose Build > Build Solution
  17. Select project INSTALL in Solution Explorer, and then choose Build > Project Only > Build Only INSTALL
  18. Close Visual C++ 2008 Express Edition
  19. Copy the directories bin and shared from <SDKHOME>\autopano-sift-C\INSTALL\FILES to <SDKHOME>\autopano-sift-C

Result

The applications are stored in <SDKHOME>\autopano-sift-C\bin

The manual pages are stored in <SDKHOME>\autopano-sift-C\shared

Note
To save disc space you may delete all files and directories in <SDKHOME>\autopano-sift-C, except the sub-directories bin and shared.

Guido 11:54, 28 February 2009 (CET)