安装itk

下载安装包InsightToolkit-3.20.1.tar.gz,下载地址,当前已经itk最新版已经是4.7了,但是项目需要,这里的步骤是成功安装3.20.1。环境:Ubuntu 12.04,gcc-4.6


sudo tar -xvf InsightToolkit-3.20.1.tar.gz


mkdir build

cd build/

ccmake ../InsightToolkit-3.20.1


出现错误:

Could not find the UUID dev library files on your system (uuid/uuid.h missing). Using the default internal implementation (it is known to be weak)


apt-file search uuid.h

可以看到它包括在库uuid-dev

uuid-dev: /usr/include/uuid/uuid.h


sudo apt-get install uuid-dev


安装后继续:

ccmake ../InsightToolkit-3.20.1


CMake配置如下:

BUILD_DOXYGEN                   OFF                                                   

BUILD_EXAMPLES                  ON          

BUILD_SHARED_LIBS               OFF        

BUILD_TESTING                   ON         

CMAKE_BACKWARDS_COMPATIBILITY   2.4                                       

CMAKE_BUILD_TYPE                release                                                                                                                                                                 

CMAKE_INSTALL_PREFIX            /usr/local/InsightToolkit-3.20.1      

ITK_USE_KWSTYLE                 OFF


c完成,g完成。无错误无警告。


sudo make


sudo make install


顺利完成。


这里发现一个问题,就是我这个组装的台式机在gcc-4.8版本上装这同一个版本的itk时,报头文件找不到的错误,点这里有错误记录

你可能感兴趣的:(linux,gcc,cmake,ITK)