我遵循了本教程,基于 ARM 的 Linux 系统的交叉编译,以便为基于 ARM 的 Linux 系统(在ODROID-XU4 Mini PC上运行的 Ubuntu Mate )构建Opencv
版本 3.3.1 。对于我正在运行的构建过程。cmake
Ubuntu Mate v 16.04.1 x86
请注意,我已经尝试按照本教程(Linux 中的 Opencv 安装)Opencv
为我正在运行的机器构建相同的版本,并且我成功地做到了。但是,在使用同一台机器为 ARM 构建它时,出现以下错误。Intel x86 Ubuntu based
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:114 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:114 (project):
No CMAKE_C_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/jhon/Programs/opencv-3.3.1/arm/CMakeFiles/CMakeOutput.log".
See also "/home/jhon/Programs/opencv-3.3.1/arm/CMakeFiles/CMakeError.log".
这是生成此错误的命令行:
cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake ..
请注意,该选项-DCMAKE_TOOLCHAIN_FILE
告诉我们cmake
为基于 ARM 的 Linux 系统构建 Opencv,当我尝试删除它时,我成功地Opencv
为我的 x86 机器构建了没有任何错误的机器。
提前致谢。