[Insight-users] Compiling ITK on Windows

Raghavendra Chandrashekara rc3@doc.ic.ac.uk
Tue, 4 Mar 2003 17:04:49 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_001F_01C2E270.2A763680
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi Luis,

Thanks for your quick reply!

> It looks like you are opening the .dsp
> project in Testing directly instead of
> loading the main .dsw file.
>
> It this the case ?

No, I opened the ITK.sln file that is created in the build directory. I
think that's the correct file to open isn't it? When I built the solution,
all of the libraries where built properly. It was just the test projects
which didn't succeed. There were some linking errors with the png library.

The reason I am using the CVS version of ITK is because I want to use the
GIPL image readers which are not in the current release. I've written a
small program which reads a GIPL image and writes it out again. I've
attached the source code for the program and the CMakeLists.txt file. I
think they are correct but there is still the linking problem.

Thanks,

Raghavendra

------=_NextPart_000_001F_01C2E270.2A763680
Content-Type: text/plain;
	name="ITKGIPLImageTest.cxx"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="ITKGIPLImageTest.cxx"

#include <iostream>

using namespace std;

#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"

/* Program reads a GIPl image and writes it out again. */
int main(int argc, char** argv)
{
  if (argc != 3) {
    cout << "Usage: ITKGIPLImageTest input.gipl output.gipl" << endl;
    exit(1);
  }

  typedef short PixelType;
  typedef itk::Image<PixelType, 3> ImageType;
  typedef itk::ImageFileReader<ImageType> ReaderType;
  typedef itk::ImageFileWriter<ImageType> WriterType;

  try {
    ReaderType::Pointer pReader = ReaderType::New();
    WriterType::Pointer pWriter = WriterType::New();

    pReader->SetFileName(argv[1]);
    pWriter->SetFileName(argv[2]);

    pWriter->SetInput(pReader->GetOutput());

    pWriter->Update();
  }
  catch (itk::ExceptionObject& ex) {
    cout << "Exception object caught!" << endl;
    exit(1);
  }

  return 0;
}
------=_NextPart_000_001F_01C2E270.2A763680
Content-Type: text/plain;
	name="CMakeCache.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="CMakeCache.txt"

# This is the CMakeCache file.=0A=
# For build in directory: /homes/rc3/src/windows/ITKGIPLImageTest=0A=
# You can edit this file to change values found and used by cmake.=0A=
# If you do not want to change any of the values, simply exit the editor.=0A=
# If you do want to change a value, simply edit, save, and exit the =
editor.=0A=
# The syntax for the file is as follows:=0A=
# KEY:TYPE=3DVALUE=0A=
# KEY is the name of a varible in the cache.=0A=
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.=0A=
# VALUE is the current value for the KEY.=0A=
=0A=
########################=0A=
# EXTERNAL cache entries=0A=
########################=0A=
=0A=
//Path to a program.=0A=
CMAKE_AR:FILEPATH=3D/usr/bin/ar=0A=
=0A=
//For backwards compatibility, what version of CMake commands and=0A=
// syntax should this version of CMake allow.=0A=
CMAKE_BACKWARDS_COMPATIBILITY:STRING=3D1.6=0A=
=0A=
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or=0A=
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.=0A=
//=0A=
CMAKE_BUILD_TYPE:STRING=3D=0A=
=0A=
//C++ compiler=0A=
CMAKE_CXX_COMPILER:STRING=3Dc++=0A=
=0A=
//Path to a program.=0A=
CMAKE_CXX_COMPILER_FULLPATH:FILEPATH=3D/usr/bin/c++=0A=
=0A=
//Flags used by the compiler during all build types.=0A=
CMAKE_CXX_FLAGS:STRING=3D=0A=
=0A=
//Flags used by the compiler during debug builds.=0A=
CMAKE_CXX_FLAGS_DEBUG:STRING=3D-g=0A=
=0A=
//Flags used by the compiler during release minsize builds.=0A=
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=3D-Os=0A=
=0A=
//Flags used by the compiler during release builds (/MD /Ob1 /Oi=0A=
// /Ot /Oy /Gs will produce slightly less optimized but smaller=0A=
// files).=0A=
CMAKE_CXX_FLAGS_RELEASE:STRING=3D-O3=0A=
=0A=
//Flags used by the compiler during Release with Debug Info builds.=0A=
//=0A=
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=3D-O2 -g=0A=
=0A=
//C compiler=0A=
CMAKE_C_COMPILER:STRING=3Dgcc=0A=
=0A=
//Path to a program.=0A=
CMAKE_C_COMPILER_FULLPATH:FILEPATH=3D/usr/bin/gcc=0A=
=0A=
//Flags for C compiler.=0A=
CMAKE_C_FLAGS:STRING=3D=0A=
=0A=
//Flags used by the compiler during debug builds.=0A=
CMAKE_C_FLAGS_DEBUG:STRING=3D-g=0A=
=0A=
//Flags used by the compiler during release minsize builds.=0A=
CMAKE_C_FLAGS_MINSIZEREL:STRING=3D-Os=0A=
=0A=
//Flags used by the compiler during release builds (/MD /Ob1 /Oi=0A=
// /Ot /Oy /Gs will produce slightly less optimized but smaller=0A=
// files).=0A=
CMAKE_C_FLAGS_RELEASE:STRING=3D-O3=0A=
=0A=
//Flags used by the compiler during Release with Debug Info builds.=0A=
//=0A=
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=3D-O2 -g=0A=
=0A=
//Flags used by the linker.=0A=
CMAKE_EXE_LINKER_FLAGS:STRING=3D=0A=
=0A=
//Flags used by the linker during debug builds.=0A=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=3D=0A=
=0A=
//Flags used by the linker during release minsize builds.=0A=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=3D=0A=
=0A=
//Flags used by the linker during release builds.=0A=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=3D=0A=
=0A=
//Flags used by the linker during Release with Debug Info builds.=0A=
//=0A=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=3D=0A=
=0A=
//Install path prefix, prepended onto install directories.=0A=
CMAKE_INSTALL_PREFIX:PATH=3D/usr/local=0A=
=0A=
//Path to a program.=0A=
CMAKE_MAKE_PROGRAM:FILEPATH=3D/homes/rc3/bin/gmake=0A=
=0A=
//Flags used by the linker during the creation of modules.=0A=
CMAKE_MODULE_LINKER_FLAGS:STRING=3D=0A=
=0A=
//Flags used by the linker during debug builds.=0A=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=3D=0A=
=0A=
//Flags used by the linker during release minsize builds.=0A=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=3D=0A=
=0A=
//Flags used by the linker during release builds.=0A=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=3D=0A=
=0A=
//Flags used by the linker during Release with Debug Info builds.=0A=
//=0A=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=3D=0A=
=0A=
//Path to a program.=0A=
CMAKE_RANLIB:FILEPATH=3D/usr/bin/ranlib=0A=
=0A=
//Flags used by the linker during the creation of dll's.=0A=
CMAKE_SHARED_LINKER_FLAGS:STRING=3D=0A=
=0A=
//Flags used by the linker during debug builds.=0A=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=3D=0A=
=0A=
//Flags used by the linker during release minsize builds.=0A=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=3D=0A=
=0A=
//Flags used by the linker during release builds.=0A=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=3D=0A=
=0A=
//Flags used by the linker during Release with Debug Info builds.=0A=
//=0A=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=3D=0A=
=0A=
//If set, runtime paths are not added when using shared libraries.=0A=
//=0A=
CMAKE_SKIP_RPATH:BOOL=3DOFF=0A=
=0A=
//If this value is on, makefiles will be generated without the=0A=
// .SILENT directive, and all commands will be echoed to the console=0A=
// during the make.  This is useful for debugging only.=0A=
CMAKE_VERBOSE_MAKEFILE:BOOL=3DOFF=0A=
=0A=
//Single output directory for building all executables.=0A=
EXECUTABLE_OUTPUT_PATH:PATH=3Dbin=0A=
=0A=
//Value Computed by CMake=0A=
ITKGIPLImageTest_BINARY_DIR:STATIC=3D/homes/rc3/src/windows/ITKGIPLImageT=
est=0A=
=0A=
//Value Computed by CMake=0A=
ITKGIPLImageTest_SOURCE_DIR:STATIC=3D/homes/rc3/src/windows/ITKGIPLImageT=
est=0A=
=0A=
//The directory containing ITKConfig.cmake.  This is either the=0A=
// root of the build tree, or PREFIX/lib/InsightToolkit for an=0A=
// installation.=0A=
ITK_DIR:PATH=3D/vol/vipdata/packages/InsightCVS=0A=
=0A=
//Single output directory for building all libraries.=0A=
LIBRARY_OUTPUT_PATH:PATH=3D=0A=
=0A=
=0A=
########################=0A=
# INTERNAL cache entries=0A=
########################=0A=
=0A=
//Advanced flag for variable: CMAKE_AR=0A=
CMAKE_AR-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_BUILD_TOOL=0A=
CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=3D1=0A=
//What is the target build tool cmake is generating for.=0A=
CMAKE_BUILD_TOOL:INTERNAL=3D/homes/rc3/bin/gmake=0A=
//This is the directory where this CMakeCahe.txt was created=0A=
CMAKE_CACHEFILE_DIR:INTERNAL=3D/homes/rc3/src/windows/ITKGIPLImageTest=0A=
//Major version of cmake used to create the current loaded cache=0A=
//=0A=
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3D1=0A=
//Minor version of cmake used to create the current loaded cache=0A=
//=0A=
CMAKE_CACHE_MINOR_VERSION:INTERNAL=3D6=0A=
//Major version of cmake used to create the current loaded cache=0A=
//=0A=
CMAKE_CACHE_RELEASE_VERSION:INTERNAL=3Dpatch 3=0A=
//Path to CMake executable.=0A=
CMAKE_COMMAND:INTERNAL=3D/vol/vipdata/packages/CMake-1.6.3/bin/cmake=0A=
//Advanced flag for variable: CMAKE_CXX_COMPILER=0A=
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_CXX_COMPILER_FULLPATH=0A=
CMAKE_CXX_COMPILER_FULLPATH-ADVANCED:INTERNAL=3D1=0A=
//Result of TRY_COMPILE=0A=
CMAKE_CXX_COMPILER_WORKS:INTERNAL=3DTRUE=0A=
//Advanced flag for variable: CMAKE_CXX_FLAGS=0A=
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_CXX_FLAGS_DEBUG=0A=
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_CXX_FLAGS_MINSIZEREL=0A=
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELEASE=0A=
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO=0A=
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_COMPILER=0A=
CMAKE_C_COMPILER-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_COMPILER_FULLPATH=0A=
CMAKE_C_COMPILER_FULLPATH-ADVANCED:INTERNAL=3D1=0A=
//Result of TRY_COMPILE=0A=
CMAKE_C_COMPILER_WORKS:INTERNAL=3DTRUE=0A=
//Advanced flag for variable: CMAKE_C_FLAGS=0A=
CMAKE_C_FLAGS-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_FLAGS_DEBUG=0A=
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_FLAGS_MINSIZEREL=0A=
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_FLAGS_RELEASE=0A=
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_C_FLAGS_RELWITHDEBINFO=0A=
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=3D1=0A=
//Path to cache edit program executable.=0A=
CMAKE_EDIT_COMMAND:INTERNAL=3D/vol/vipdata/packages/CMake-1.6.3/bin/ccmak=
e=0A=
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS=0A=
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG=0A=
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL=0A=
//=0A=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE=0A=
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO=0A=
//=0A=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=3D1=0A=
//Name of generator.=0A=
CMAKE_GENERATOR:INTERNAL=3DUnix Makefiles=0A=
//Start directory with the top level CMakeLists.txt file for this=0A=
// project=0A=
CMAKE_HOME_DIRECTORY:INTERNAL=3D/homes/rc3/src/windows/ITKGIPLImageTest=0A=
//Advanced flag for variable: CMAKE_MAKE_PROGRAM=0A=
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS=0A=
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG=0A=
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL=0A=
//=0A=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE=0A=
//=0A=
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO=0A=
//=0A=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_RANLIB=0A=
CMAKE_RANLIB-ADVANCED:INTERNAL=3D1=0A=
//Path to CMake installation.=0A=
CMAKE_ROOT:INTERNAL=3D/vol/vipdata/packages/CMake-1.6.3/share/CMake=0A=
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS=0A=
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG=0A=
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL=0A=
//=0A=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE=0A=
//=0A=
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO=0A=
//=0A=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=3D1=0A=
//Advanced flag for variable: CMAKE_SKIP_RPATH=0A=
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=3D1=0A=
//uname command=0A=
CMAKE_UNAME:INTERNAL=3D/bin/uname=0A=
//Advanced flag for variable: CMAKE_VERBOSE_MAKEFILE=0A=
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=3D1=0A=
//Path to an executable=0A=
ITKGIPLImageTest_CMAKE_PATH:INTERNAL=3D/homes/rc3/src/windows/ITKGIPLImag=
eTest=0A=
=0A=

------=_NextPart_000_001F_01C2E270.2A763680--