1

跑步cmake -DCMAKE_TOOLCHAIN_FILE=ceres-solver/cmake/iOS.cmake -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DEIGEN_INCLUDE_DIR=/usr/local/Cellar/eigen -DIOS_PLATFORM=OS ceres-solver

给了我这些错误

-- Using minimal glog substitute (include): internal/ceres/miniglog
-- Max log level for minimal glog substitute: 2
-- Building without OpenMP, disabling.
-- Neither OpenMP or TBB is enabled, disabling multithreading.
-- Looking for C++ include unordered_map
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_3feba/fast"
-- Looking for C++ include unordered_map - not found
-- Looking for C++ include tr1/unordered_map
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_36cb7/fast"
-- Looking for C++ include tr1/unordered_map - not found
-- Unable to find <unordered_map> or <tr1/unordered_map>.
-- Replacing unordered_map/set with map/set (warning: slower!), try enabling CXX11 option if you expect C++11 to be available.
-- Looking for C++ include memory
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_013b8/fast"
-- Looking for C++ include memory - not found
-- Looking for C++ include tr1/memory
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_bb377/fast"
-- Looking for C++ include tr1/memory - not found
CMake Error at CMakeLists.txt:494 (message):
  Unable to find shared_ptr, try enabling CXX11 option if you expect C++11 to
  be available.

即使我将 CXX11 设置为 ON,我也会得到同样的错误。我应该怎么办?

假设我得到这个工作,我只是跑来make install获取libceres.a文件吗?

很多帮助表示赞赏。

4

1 回答 1

0

这不是 C++11 错误,请注意错误

CMake 错误:生成器:make 执行失败。制作命令是:“CMAKE_MAKE_PROGRAM”“cmTC_3feba/fast”

CMake 试图通过编译几个简短的程序片段来确定各种 c++11 功能的存在,但由于一些与 Make 相关的问题(您是否安装了 make?Xcore 命令行工具?)而无法这样做,并且它结束了得出结论,c++11 不可用。

这里要解决的问题是查看系统上的 Make 发生了什么。

于 2018-03-18T14:16:34.657 回答