使用Python绑定安装ITK时出错

2024-09-29 02:27:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在OSX10.8.4上安装ITK4.2.2。我使用Unix Makefiles生成器用cmake2.8.11.1构建了它。我需要python包装,所以我选择了ITK_WRAP_PYTHON。在我构建它之后,我进入终端中包含构建文件的目录并输入make。这一切进展顺利,直到我收到以下信息:

[ 41%] Generating vcl_complex.xml
In file included from /usr/include/c++/4.2.1/climits:50,
                 from /usr/include/c++/4.2.1/bits/stl_algobase.h:67,
                 from /usr/include/c++/4.2.1/bits/char_traits.h:46,
                 from /usr/include/c++/4.2.1/string:47,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkMacro.h:46,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkLightObject.h:21,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkObject.h:31,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkCommand.h:21,
                 from /Applications/ITK/build/Wrapping/Modules/ITKCommon/vcl_complex.cxx:1:
/usr/bin/../lib/clang/4.2/include/limits.h:37:54: error: missing binary operator before token "("
In file included from /usr/include/c++/4.2.1/bits/postypes.h:49,
                 from /usr/include/c++/4.2.1/iosfwd:49,
                 from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
                 from /usr/include/c++/4.2.1/bits/char_traits.h:46,
                 from /usr/include/c++/4.2.1/string:47,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkMacro.h:46,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkLightObject.h:21,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkObject.h:31,
                 from /Applications/ITK/src/Modules/Core/Common/include/itkCommand.h:21,
                 from /Applications/ITK/build/Wrapping/Modules/ITKCommon/vcl_complex.cxx:1:
/usr/bin/../lib/clang/4.2/include/stdint.h:32:54: error: missing binary operator before token "("
make[2]: *** [Wrapping/Modules/ITKCommon/vcl_complex.xml] Error 1
make[1]: *** [Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonGccXML.dir/all] Error 2
make: *** [all] Error 2

在这一点上,我不确定它是否“有效”,因为在许多不同的进程中,它已经从1%变成了100%,所以我输入了sudo make install。过了一会儿,我也犯了同样的错误。在

问题

  1. 我怎样才能消除这个错误?在
  2. 我需要重新开始安装吗?在
  3. 如果我需要重新开始,有没有一种方法可以先撤销我已经做过的事情,得到一个干净的安装?在

Tags: fromcoresrcmodulesmakeincludeusrcommon