问题描述
我在Windows 7(64位)上使用CMake(尽管我在32位上编译)。
I am using CMake on Windows 7, 64 bit (although I'm compiling in 32 bit).
我正在尝试安装库,当我从界面运行CMake时,出现以下错误:
I am trying to install vxl library and when I run CMake (from interface) I get the following error:
The C compiler identification is unknown
The CXX compiler identification is unknown
Check if the system is big endian
Searching 16 bit integer
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
config/cmake/config/CMakeLists.txt:287 (TEST_BIG_ENDIAN)
Configuring incomplete, errors occurred!
我将VS 2008的默认编译器用于32位。看起来是内部CMake错误,我在互联网上找不到任何有用的信息。问题是,当我尝试重新配置已安装的库时,会遇到相同的错误。
I use the default compiler of VS 2008 for 32 bit. It looks like an internal CMake error and I couldn't find anything helpful on the internet. The thing is that I get the same error when I try to reconfigure the -already installed- ITK library.
注意:当我第一次尝试配置CMake时,我得到了成千上万种类型的错误:
NOTE: When I first try to configure CMake I get bazillions of errors of the type:
CMake Error: Internal CMake error, TryCompile configure of cmake failed
在创建CMakeCache并设置cmake变量后,它们不再出现。在第二个配置中,尝试仅出现第一个错误。
They don't appear again after the CMakeCache is created and I set the cmake variables. In the second "Configure" try only the first error appears.
我真的不知道如何继续,有人可以帮助吗?
预先谢谢您。
I really don't have any idea on how to continue, can anyone help?Thank you in advance.
推荐答案
就是这个问题。由于gcc问题,我以前的版本已出错。
Just had this issue. My previous build had errored because of a gcc issue.
修复构建后,我运行cmake时没有将构建文件夹擦干净,并收到此错误。
After fixing the build, I ran cmake without wiping the build folder clean and received this error.
简单的 rm -rf *
(使用此命令时,请确保您在正确的目录中!)删除了不需要的文件/文件夹(CMakeFiles,CMakeCache.txt等)。
A simple rm -rf *
(make sure you're in the right directory when you use this!) deleted the undesired files/folders (CMakeFiles, CMakeCache.txt, etc).
运行cmake再次给我带来了成功。是的,只需在运行cmake之前确保目录是干净的就可以了。
Running cmake again gave me a successful build. So yeah, just make sure your directory is clean before running cmake and you should be fine.
这篇关于CMake内部错误(TEST_BIG_ENDIAN)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!