The reason may be that Ceres did not specify the C + + version, but a-loam did. So make a-loam consistent with Ceres
Add the following code to cmakelists of a-loam
# Set the C++ version (must be >= C++14) when compiling Ceres.
#
# Reflect a user-specified (via -D) CMAKE_CXX_STANDARD if present, otherwise
# default to C++14.
set(DEFAULT_CXX_STANDARD ${CMAKE_CXX_STANDARD})
if (NOT DEFAULT_CXX_STANDARD)
set(DEFAULT_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD ${DEFAULT_CXX_STANDARD} CACHE STRING
"C++ standard (minimum 14)" FORCE)
# Restrict CMAKE_CXX_STANDARD to the valid versions permitted and ensure that
# if one was forced via -D that it is in the valid set.
set(ALLOWED_CXX_STANDARDS 14 17 20)
set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS ${ALLOWED_CXX_STANDARDS})
list(FIND ALLOWED_CXX_STANDARDS ${CMAKE_CXX_STANDARD} POSITION)
if (POSITION LESS 0)
message(FATAL_ERROR "Invalid CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}. "
"Must be one of: ${ALLOWED_CXX_STANDARDS}")
endif()
# Specify the standard as a hard requirement, otherwise CMAKE_CXX_STANDARD is
# interpreted as a suggestion that can decay *back* to lower versions.
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "")
mark_as_advanced(CMAKE_CXX_STANDARD_REQUIRED)
There are other methods as follows, but I didn’t try
Modifying cmake: set the C + + standard:
set(CMAKE_CXX_FLAGS "-std=c++11")
Change to
set(CMAKE_CXX_STANDARD 11)
Read More:
- [Solved] VINS-MONO: integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
- How to Solve Ceres library Error when compiling A-LOAM
- How to Solve error C2039: “to_ String “: not a member of” STD “
- MOTR compiling error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_R
- std::dynamic_pointer_cast Error: source type is not polymorphic
- Error: array bound is not an integer constant before ‘]’ token
- [Solved] runtime error: reference binding to null pointer of type ‘std::vector<int, std::allocator<int>>‘
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- [Solved] error: value createSchemaRDD is not a member of org.apache.spark.sql.SQLContext
- [Solved] Data Set reproduct loam_velodyne Fully error: [multiscanregistration-1]
- Python draw error: ValueError: ‘color’ kwarg must be a color or sequence of color specs. For a sequence of values to b
- [Fixed] error: ‘start‘ is a private member of ‘QThread‘
- [Solved] ORB_SLAM3 Compile Error: opencv4.0 not found four
- RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
- Vscode pylint reported an error of “no member”, but it is running normally
- UE4 Package Pico Project Error: error: ‘Resource‘ is a private member of ‘FOpenGLTextureBase‘
- [Solved] dhl: Error: LINQ to Entities does not support the specified type member “Date”
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused
- Cmake Compile opencv error: The system is: Windows – 10.0.19042 – AMD64 (Log File)
- C++ Error: terminating with uncaught exception of type std::out_of_range: vector Abort trap: 6