正在运行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
文件?
非常感谢。
答案 0 :(得分:0)
这不是C ++ 11错误,请注意错误
CMake错误:生成器:执行make失败。命令是:&#34; CMAKE_MAKE_PROGRAM&#34; &#34; cmTC_3feba /快&#34;
CMake正在尝试通过编译几个短程序片段来确定各种c ++ 11功能的存在,并且由于一些与Make相关的问题而无法这样做(你是否已经安装了?Xcore命令行工具?)最终得出的结论是c ++ 11不可用。
这里需要解决的问题是看看Make在你的系统上发生了什么。