环境配置信息:
显卡3050Ti
Driver Version: 470.82.00
cuda:11.0
eigen:3.4.0
ceres:2.0.0
安装colmap 3.7
安装过程出现问题:
colmap 报错error: #error This file requires compiler and library support for the ISO C++ 2011 standard.
解决:
在colmap的cmakelist.txt 添加c++的配置信息
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
放置位置 在project()下面
例如:

在安装colmap3.7过程中遇到错误,提示需要C++2011标准的支持。为解决此问题,需在colmap的CMakeLists.txt文件中添加检查并设置C++编译器标志,确保使用C++11或C++0x标准。在项目配置部分添加相关代码,若编译器不支持C++11,则会给出提示更换编译器。

3771

被折叠的 条评论
为什么被折叠?



