Building Caret from Source Code
You must have the following libraries:
- QT 4.1.x or later. (www.trolltech.com) Caret will no longer
compile with QT 3.X. Some versions of QT 4.1 and earlier have a
bug that prevents correct file reading.
- VTK 4.2.x (www.vtk.org)
- QWT 5 (qwt.sourceforge.net).
The following libraries are optional:
- NetCDF (http://www.unidata.ucar.edu/software/netcdf/).
- Minc
(http://www.bic.mni.mcgill.ca/software/minc/minc.html). Requires
the NetCDF library. If you do not
use this library, reading and writing of MINC volume files will not be
available. Minc and NetCDF should be installed in the same
directories.
- ITK (www.itk.org). If you do not use this library,
non-uniformity correction of volume files will not be available.
This library may be required in future versions of Caret.
Environment Variables
- ITK_INC_DIR is set to the directory containing the ITK
include files. If you do not have ITK, do not set this
environement variable and Caret will configure and build without ITK.
- ITK_LIB_DIR is set to the directory containing the ITK
libraries. If you do not have ITK, do not set this environement
variable and Caret will configure and build without ITK.
- NETCDF_INC_DIR is set to the directory containing both the NetCDF
and MINC include files. If you do not have NetCDF and Minc, do
not set this environment variable.
- NETCDF_LIB_DIR is set to the directory containing both the NetCDF
and MINC libraries. If you do not have NetCDF and Minc, do not
set this environment
variable.
- QTDIR is set to the QT top level directory.
- QWT_INC_DIR is set to the directory containing the QWT include
files.
- QWT_LIB_DIR is set to the directory containing the QWT library.
- VTK_INC_DIR is set to the directory containing the VTK include
files.
- VTK_LIB_DIR is set to the directory containing the VTK libraries.
- ZLIB_INC_DIR (Microsoft Windows only) is set to the directory
containing the ZLIB include files.
Platform Specific Notes - Linux
- QT 4.1 and later seems to require newer versions of Linux (at
least 2.4.21-37). Previous versions did not compile due to
missing "FC_RGBA" type messages.
- We use GCC 3.2.x but Caret should compile with newer versions of
GCC.
Platform Specific Notes - Mac OSX
- We use OSX 10.4.
- We use GCC 4.0.1.
- If you want to build a universal binary (runs on both PowerPC and
Intel Macs), all sofware (Caret and libraries) must be compiled with
"-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc".
Programs must be linked with
"-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch
ppc". For Caret, these values are in the
"caret_source/caret_qmake_include.pro" file. Since linking
multiple architectures is very slow, the linking options may be
commented out.
Platform Specific Notes - Microsoft Windows
- You must have the MinGW package (http://www.mingw.org/) which
contains the GNU compilers and tools for Microsoft Windows Operating
Systems. We use MinGW version 4.1 which contains GCC version
3.4.2.
- Microsoft's Visual Studio/C++ has significant problems with the
C++ standard library. You might be able to compile Caret with
MSVC but it will crash in standard library operations. You will
most likely also encounter problems when linking with MSVC.
- Bordland's compiler is no longer supported for QT 4 and later so
it unlikely that you can use it.
Configuring and Building Caret5 Source Code (Mac OSX and Linux)
- Be sure that all libraries have been built and all needed
environment variables have been set.
- Start a terminal window and execute the following commands in the
terminal window.
- Unzip the source code file (unzip caret_source.vX.Y.zip).
- Go into ("cd") the caret_source directory.
- Configure the source code using "make qmake-static" for static
libraries or "make qmake-dynamic" to build sharded object libaries.
- Run "make build" to build the source code.
Configuring and Building Caret5 Source Code (Microsoft Windows)
- Be sure that all libraries have been built and all needed
environment variables have been set.
- Unzip the source code.
- Start a DOS window and execute the following commands in the Dos
window. You must build from within the DOS window. If you
have MYSYS, building will not work in the MYSYS window.
- Unzip the source code file (unzip caret_source.vX.Y.zip).
- Go into ("cd") the caret_source directory.
- Configure the source code using "run_qmake_dos.bat" for static
libraries.
- Run "build_dos_gcc.bat" to build the source code.