Building Caret from Source Code
You must have the following libraries:
- QT 4.7.1. (www.trolltech.com) Caret will no longer
compile with QT 3.X. Some versions of QT have a
bug that prevents correct file reading.
- VTK 5.4.2 (www.vtk.org).
The following libraries are optional:
- Minc requires NetCDF
(http://www.unidata.ucar.edu/software/netcdf/).
- Minc
(http://www.bic.mni.mcgill.ca/software/minc/minc.html). Requires
the NetCDF library (may now use HDF5). 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.
- QWT 5 (qwt.sourceforge.net) Required for a couple of graphs in
GUI.
Environment Variables
- 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. Do not set this variable if you do not have QWT.
- QWT_LIB_DIR is set to the directory containing the QWT
library. Do not set this variable if you do not have QWT.
- 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 4.0.2 but Caret should compile with newer versions of
GCC.
Platform Specific Notes - Mac OSX
- We use OSX 10.6
- We use GCC 4.2.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 may crash in standard library operations. You will
most likely also encounter problems when linking with MSVC. MSVC
problems may be resolved.
- 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.