SLAM十四讲ch10中ceres

SLAM十四讲ch10中ceres,第1张

在进行ceres_custombundle复现进行编译时出现以下错误:

[ 33%] Built target BALProblem
[ 66%] Built target ParseCmd
[ 83%] Building CXX object CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o
In file included from /usr/local/include/ceres/internal/parameter_dims.h:37,
                 from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
   64 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
   64 | struct SumImpl> {
      |                                              ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
   64 | struct SumImpl> {
      |                                                 ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
   71 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
   71 | struct SumImpl> {
      |                                                   ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
   71 | struct SumImpl> {
      |                                                      ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
   78 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:59: error: wrong number of template arguments (6, should be 1)
   78 | struct SumImpl> {
      |                                                           ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:62: error: expected unqualified-id before ‘>’ token
   78 | struct SumImpl> {
      |                                                              ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
   85 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:41: error: wrong number of template arguments (2, should be 1)
   85 | struct SumImpl> {
      |                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:42: error: expected unqualified-id before ‘>’ token
   85 | struct SumImpl> {
      |                                          ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
   91 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:38: error: template argument 1 is invalid
   91 | struct SumImpl> {
      |                                      ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:39: error: expected unqualified-id before ‘>’ token
   91 | struct SumImpl> {
      |                                       ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
  135 |                          std::integer_sequence,
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: template argument 3 is invalid
  135 |                          std::integer_sequence,
      |                                                           ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: type/value mismatch at argument 4 in template parameter list for ‘template struct ceres::internal::ExclusiveScanImpl’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: note:   expected a type, got ‘N’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
  146 | struct ExclusiveScanImpl, SeqOut> {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:57: error: wrong number of template arguments (3, should be 4)
  146 | struct ExclusiveScanImpl, SeqOut> {
      |                                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:130:8: note: provided for ‘template struct ceres::internal::ExclusiveScanImpl’
  130 | struct ExclusiveScanImpl;
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
  160 |       typename ExclusiveScanImpl>::Type;
      |                                                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:70: error: template argument 4 is invalid
  160 |       typename ExclusiveScanImpl>::Type;
      |                                                                      ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:16: error: expected nested-name-specifier
  160 |       typename ExclusiveScanImpl>::Type;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h:44:55: error: ‘integer_sequence’ is not a member of ‘std’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:72: error: expected primary-expression before ‘int’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                                                                        ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘template constexpr const bool ceres::internal::IsValidParameterDimensionSequence’ redeclared as different kind of entity
   50 |     std::integer_sequence) {
      |          ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:16: note: previous declaration ‘constexpr const bool ceres::internal::IsValidParameterDimensionSequence’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘integer_sequence’ is not a member of ‘std’
   50 |     std::integer_sequence) {
      |          ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:27: error: expected primary-expression before ‘int’
   50 |     std::integer_sequence) {
      |                           ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:40: error: expected ‘)’ before ‘>’ token
   50 |     std::integer_sequence) {
      |                                        ^
      |                                        )
/usr/local/include/ceres/internal/parameter_dims.h:49:49: note: to match this ‘(’
   49 | constexpr bool IsValidParameterDimensionSequence(
      |                                                 ^
/usr/local/include/ceres/internal/parameter_dims.h:69:27: error: ‘integer_sequence’ in namespace ‘std’ does not name a template type
   69 |   using Parameters = std::integer_sequence;
      |                           ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: error: there are no arguments to ‘Parameters’ that depend on a template parameter, so a declaration of ‘Parameters’ must be available [-fpermissive]
   74 |       IsValidParameterDimensionSequence(Parameters());
      |                                         ^~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
   85 |       Sum>::Value;
      |                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/parameter_dims.h:85:43: error: template argument 1 is invalid
   85 |       Sum>::Value;
      |                                           ^~
/usr/local/include/ceres/internal/parameter_dims.h:101:20: error: ‘std::integer_sequence’ has not been declared
  101 |       T* ptr, std::integer_sequence) {
      |                    ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:101:36: error: expected ‘,’ or ‘...’ before ‘<’ token
  101 |       T* ptr, std::integer_sequence) {
      |                                    ^
/usr/local/include/ceres/internal/parameter_dims.h: In static member function ‘static std::array::kNumParameterBlocks> ceres::internal::ParameterDims::GetUnpackedParameters(T*)’:
/usr/local/include/ceres/internal/parameter_dims.h:94:35: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
   94 |     using Offsets = ExclusiveScan;
      |                                   ^~~~~~~~~~
      |                                   ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:94:45: error: template argument 1 is invalid
   94 |     using Offsets = ExclusiveScan;
      |                                             ^
/usr/local/include/ceres/internal/parameter_dims.h:95:39: error: there are no arguments to ‘Offsets’ that depend on a template parameter, so a declaration of ‘Offsets’ must be available [-fpermissive]
   95 |     return GetUnpackedParameters(ptr, Offsets());
      |                                       ^~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: At global scope:
/usr/local/include/ceres/internal/variadic_evaluate.h:53:39: error: ‘std::integer_sequence’ has not been declared
   53 |                                  std::integer_sequence) {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:53:55: error: expected ‘,’ or ‘...’ before ‘<’ token
   53 |                                  std::integer_sequence) {
      |                                                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h:66:39: error: ‘std::integer_sequence’ has not been declared
   66 |                                  std::integer_sequence) {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:66:55: error: expected ‘,’ or ‘...’ before ‘<’ token
   66 |                                  std::integer_sequence) {
      |                                                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h: In function ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*)’:
/usr/local/include/ceres/internal/variadic_evaluate.h:77:12: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
   77 |       std::make_integer_sequence;
      |            ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:80:44: error: there are no arguments to ‘ParameterBlockIndices’ that depend on a template parameter, so a declaration of ‘ParameterBlockIndices’ must be available [-fpermissive]
   80 |       functor, input, output, IsDynamic(), ParameterBlockIndices());
      |                                            ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: At global scope:
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
  217 | struct Make1stOrderPerturbations,
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:217:69: error: template argument 1 is invalid
  217 | struct Make1stOrderPerturbations,
      |                                                                     ^
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
  232 | struct Make1stOrderPerturbations,
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:232:59: error: template argument 1 is invalid
  232 | struct Make1stOrderPerturbations,
      |                                                           ^
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
  282 | struct Take1stOrderParts,
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:282:61: error: template argument 1 is invalid
  282 | struct Take1stOrderParts,
      |                                                             ^
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
  298 | struct Take1stOrderParts, ParameterIdx, Offset> {
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:298:51: error: template argument 1 is invalid
  298 | struct Take1stOrderParts, ParameterIdx, Offset> {
      |                                                   ^
In file included from /usr/local/include/ceres/ceres.h:42,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/cost_function_to_functor.h:160:29: error: ‘std::integer_sequence’ has not been declared
  160 |                        std::integer_sequence) {
      |                             ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:160:45: error: expected ‘,’ or ‘...’ before ‘<’ token
  160 |                        std::integer_sequence) {
      |                                             ^
/usr/local/include/ceres/cost_function_to_functor.h: In member function ‘bool ceres::CostFunctionToFunctor::operator()(const T*, Ts* ...) const’:
/usr/local/include/ceres/cost_function_to_functor.h:147:14: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
  147 |         std::make_integer_sequence;
      |              ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:149:41: error: there are no arguments to ‘Indices’ that depend on a template parameter, so a declaration of ‘Indices’ must be available [-fpermissive]
  149 |         GetParameterPointers(params, Indices());
      |                                         ^~~~~~~
In file included from /usr/local/include/ceres/dynamic_numeric_diff_cost_function.h:44,
                 from /usr/local/include/ceres/ceres.h:48,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/numeric_diff.h: At global scope:
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
  445 |                                           std::integer_sequence,
      |                                                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:445:78: error: template argument 2 is invalid
  445 |                                           std::integer_sequence,
      |                                                                              ^
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
  490 |                                           std::integer_sequence,
      |                                                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:490:68: error: template argument 2 is invalid
  490 |                                           std::integer_sequence,
      |                                                                    ^
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘constexpr const bool ceres::internal::ParameterDims::kIsValid’:
/usr/local/include/ceres/internal/parameter_dims.h:75:17:   required from ‘class ceres::internal::ParameterDims’
/usr/local/include/ceres/sized_cost_function.h:49:47:   required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/internal/parameter_dims.h:74:51: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
   74 |       IsValidParameterDimensionSequence(Parameters());
      |                                         ~~~~~~~~~~^~
      |                                         ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:74:40: error: ‘ceres::internal::IsValidParameterDimensionSequence’ cannot be used as a function
   74 |       IsValidParameterDimensionSequence(Parameters());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘class ceres::internal::ParameterDims’:
/usr/local/include/ceres/sized_cost_function.h:49:47:   required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/internal/parameter_dims.h:75:17: error: non-constant condition for static assertion
   75 |   static_assert(kIsValid,
      |                 ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:131,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/sized_cost_function.h: In instantiation of ‘class ceres::SizedCostFunction<2, 9, 3>’:
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/sized_cost_function.h:53:55: error: non-constant condition for static assertion
   53 |   static_assert(internal::StaticParameterDims::kIsValid,
      |                                                       ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: In instantiation of ‘bool ceres::internal::AutoDifferentiate(const Functor&, const T* const*, int, T*, T**) [with int kNumResiduals = 2; ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/autodiff_cost_function.h:210:69:   required from ‘bool ceres::AutoDiffCostFunction::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8:   required from here
/usr/local/include/ceres/internal/autodiff.h:315:9: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  315 |   using Parameters = typename ParameterDims::Parameters;
      |         ^~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:348:47: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  348 |   Make1stOrderPerturbations::Apply(parameters,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
  349 |                                                parameters_as_jets.data());
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:357:39: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  357 |   Take1stOrderParts::Apply(
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  358 |       num_outputs, residuals_as_jets.data(), jacobians);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: In instantiation of ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*) [with ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/internal/variadic_evaluate.h:108:45:   required from ‘bool ceres::internal::VariadicEvaluate(const Functor&, const T* const*, T*) [with ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’
/usr/local/include/ceres/autodiff_cost_function.h:207:55:   required from ‘bool ceres::AutoDiffCostFunction::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8:   required from here
/usr/local/include/ceres/internal/variadic_evaluate.h:80:65: error: ‘ParameterBlockIndices’ was not declared in this scope
   80 |       functor, input, output, IsDynamic(), ParameterBlockIndices());
      |                                            ~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/ceres_customBundle.dir/build.make:63:CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:81:CMakeFiles/ceres_customBundle.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
boy@Boy:~/slambook/ch10/ceres_custombundle/build$ make
[ 33%] Built target BALProblem
[ 66%] Built target ParseCmd
Scanning dependencies of target ceres_customBundle
[ 83%] Building CXX object CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o
In file included from /usr/local/include/ceres/internal/parameter_dims.h:37,
                 from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
   64 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
   64 | struct SumImpl> {
      |                                              ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
   64 | struct SumImpl> {
      |                                                 ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
   71 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
   71 | struct SumImpl> {
      |                                                   ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
   71 | struct SumImpl> {
      |                                                      ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
   78 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:59: error: wrong number of template arguments (6, should be 1)
   78 | struct SumImpl> {
      |                                                           ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:62: error: expected unqualified-id before ‘>’ token
   78 | struct SumImpl> {
      |                                                              ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
   85 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:41: error: wrong number of template arguments (2, should be 1)
   85 | struct SumImpl> {
      |                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:42: error: expected unqualified-id before ‘>’ token
   85 | struct SumImpl> {
      |                                          ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
   91 | struct SumImpl> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:38: error: template argument 1 is invalid
   91 | struct SumImpl> {
      |                                      ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:39: error: expected unqualified-id before ‘>’ token
   91 | struct SumImpl> {
      |                                       ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
  135 |                          std::integer_sequence,
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: template argument 3 is invalid
  135 |                          std::integer_sequence,
      |                                                           ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: type/value mismatch at argument 4 in template parameter list for ‘template struct ceres::internal::ExclusiveScanImpl’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: note:   expected a type, got ‘N’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
  146 | struct ExclusiveScanImpl, SeqOut> {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:57: error: wrong number of template arguments (3, should be 4)
  146 | struct ExclusiveScanImpl, SeqOut> {
      |                                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:130:8: note: provided for ‘template struct ceres::internal::ExclusiveScanImpl’
  130 | struct ExclusiveScanImpl;
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
  160 |       typename ExclusiveScanImpl>::Type;
      |                                                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:70: error: template argument 4 is invalid
  160 |       typename ExclusiveScanImpl>::Type;
      |                                                                      ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:16: error: expected nested-name-specifier
  160 |       typename ExclusiveScanImpl>::Type;
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h:44:55: error: ‘integer_sequence’ is not a member of ‘std’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:72: error: expected primary-expression before ‘int’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                                                                        ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘template constexpr const bool ceres::internal::IsValidParameterDimensionSequence’ redeclared as different kind of entity
   50 |     std::integer_sequence) {
      |          ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:44:16: note: previous declaration ‘constexpr const bool ceres::internal::IsValidParameterDimensionSequence’
   44 | constexpr bool IsValidParameterDimensionSequence(std::integer_sequence) {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:10: error: ‘integer_sequence’ is not a member of ‘std’
   50 |     std::integer_sequence) {
      |          ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:50:27: error: expected primary-expression before ‘int’
   50 |     std::integer_sequence) {
      |                           ^~~
/usr/local/include/ceres/internal/parameter_dims.h:50:40: error: expected ‘)’ before ‘>’ token
   50 |     std::integer_sequence) {
      |                                        ^
      |                                        )
/usr/local/include/ceres/internal/parameter_dims.h:49:49: note: to match this ‘(’
   49 | constexpr bool IsValidParameterDimensionSequence(
      |                                                 ^
/usr/local/include/ceres/internal/parameter_dims.h:69:27: error: ‘integer_sequence’ in namespace ‘std’ does not name a template type
   69 |   using Parameters = std::integer_sequence;
      |                           ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: error: there are no arguments to ‘Parameters’ that depend on a template parameter, so a declaration of ‘Parameters’ must be available [-fpermissive]
   74 |       IsValidParameterDimensionSequence(Parameters());
      |                                         ^~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:74:41: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
   85 |       Sum>::Value;
      |                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:85:16: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/parameter_dims.h:85:43: error: template argument 1 is invalid
   85 |       Sum>::Value;
      |                                           ^~
/usr/local/include/ceres/internal/parameter_dims.h:101:20: error: ‘std::integer_sequence’ has not been declared
  101 |       T* ptr, std::integer_sequence) {
      |                    ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h:101:36: error: expected ‘,’ or ‘...’ before ‘<’ token
  101 |       T* ptr, std::integer_sequence) {
      |                                    ^
/usr/local/include/ceres/internal/parameter_dims.h: In static member function ‘static std::array::kNumParameterBlocks> ceres::internal::ParameterDims::GetUnpackedParameters(T*)’:
/usr/local/include/ceres/internal/parameter_dims.h:94:35: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
   94 |     using Offsets = ExclusiveScan;
      |                                   ^~~~~~~~~~
      |                                   ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:94:45: error: template argument 1 is invalid
   94 |     using Offsets = ExclusiveScan;
      |                                             ^
/usr/local/include/ceres/internal/parameter_dims.h:95:39: error: there are no arguments to ‘Offsets’ that depend on a template parameter, so a declaration of ‘Offsets’ must be available [-fpermissive]
   95 |     return GetUnpackedParameters(ptr, Offsets());
      |                                       ^~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: At global scope:
/usr/local/include/ceres/internal/variadic_evaluate.h:53:39: error: ‘std::integer_sequence’ has not been declared
   53 |                                  std::integer_sequence) {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:53:55: error: expected ‘,’ or ‘...’ before ‘<’ token
   53 |                                  std::integer_sequence) {
      |                                                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h:66:39: error: ‘std::integer_sequence’ has not been declared
   66 |                                  std::integer_sequence) {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:66:55: error: expected ‘,’ or ‘...’ before ‘<’ token
   66 |                                  std::integer_sequence) {
      |                                                       ^
/usr/local/include/ceres/internal/variadic_evaluate.h: In function ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*)’:
/usr/local/include/ceres/internal/variadic_evaluate.h:77:12: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
   77 |       std::make_integer_sequence;
      |            ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/variadic_evaluate.h:80:44: error: there are no arguments to ‘ParameterBlockIndices’ that depend on a template parameter, so a declaration of ‘ParameterBlockIndices’ must be available [-fpermissive]
   80 |       functor, input, output, IsDynamic(), ParameterBlockIndices());
      |                                            ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: At global scope:
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
  217 | struct Make1stOrderPerturbations,
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:217:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:217:69: error: template argument 1 is invalid
  217 | struct Make1stOrderPerturbations,
      |                                                                     ^
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
  232 | struct Make1stOrderPerturbations,
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:232:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:232:59: error: template argument 1 is invalid
  232 | struct Make1stOrderPerturbations,
      |                                                           ^
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
  282 | struct Take1stOrderParts,
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:282:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:282:61: error: template argument 1 is invalid
  282 | struct Take1stOrderParts,
      |                                                             ^
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
  298 | struct Take1stOrderParts, ParameterIdx, Offset> {
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:298:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/autodiff.h:298:51: error: template argument 1 is invalid
  298 | struct Take1stOrderParts, ParameterIdx, Offset> {
      |                                                   ^
In file included from /usr/local/include/ceres/ceres.h:42,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/cost_function_to_functor.h:160:29: error: ‘std::integer_sequence’ has not been declared
  160 |                        std::integer_sequence) {
      |                             ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:160:45: error: expected ‘,’ or ‘...’ before ‘<’ token
  160 |                        std::integer_sequence) {
      |                                             ^
/usr/local/include/ceres/cost_function_to_functor.h: In member function ‘bool ceres::CostFunctionToFunctor::operator()(const T*, Ts* ...) const’:
/usr/local/include/ceres/cost_function_to_functor.h:147:14: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type
  147 |         std::make_integer_sequence;
      |              ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/cost_function_to_functor.h:149:41: error: there are no arguments to ‘Indices’ that depend on a template parameter, so a declaration of ‘Indices’ must be available [-fpermissive]
  149 |         GetParameterPointers(params, Indices());
      |                                         ^~~~~~~
In file included from /usr/local/include/ceres/dynamic_numeric_diff_cost_function.h:44,
                 from /usr/local/include/ceres/ceres.h:48,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/numeric_diff.h: At global scope:
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
  445 |                                           std::integer_sequence,
      |                                                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:445:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:445:78: error: template argument 2 is invalid
  445 |                                           std::integer_sequence,
      |                                                                              ^
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
  490 |                                           std::integer_sequence,
      |                                                ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/numeric_diff.h:490:48: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/numeric_diff.h:490:68: error: template argument 2 is invalid
  490 |                                           std::integer_sequence,
      |                                                                    ^
In file included from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘constexpr const bool ceres::internal::ParameterDims::kIsValid’:
/usr/local/include/ceres/internal/parameter_dims.h:75:17:   required from ‘class ceres::internal::ParameterDims’
/usr/local/include/ceres/sized_cost_function.h:49:47:   required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/internal/parameter_dims.h:74:51: error: ‘Parameters’ was not declared in this scope; did you mean ‘ParameterDims’?
   74 |       IsValidParameterDimensionSequence(Parameters());
      |                                         ~~~~~~~~~~^~
      |                                         ParameterDims
/usr/local/include/ceres/internal/parameter_dims.h:74:40: error: ‘ceres::internal::IsValidParameterDimensionSequence’ cannot be used as a function
   74 |       IsValidParameterDimensionSequence(Parameters());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/local/include/ceres/internal/parameter_dims.h: In instantiation of ‘class ceres::internal::ParameterDims’:
/usr/local/include/ceres/sized_cost_function.h:49:47:   required from ‘class ceres::SizedCostFunction<2, 9, 3>’
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/internal/parameter_dims.h:75:17: error: non-constant condition for static assertion
   75 |   static_assert(kIsValid,
      |                 ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:131,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/sized_cost_function.h: In instantiation of ‘class ceres::SizedCostFunction<2, 9, 3>’:
/usr/local/include/ceres/autodiff_cost_function.h:154:7:   required from ‘class ceres::AutoDiffCostFunction’
/home/boy/slambook/ch10/ceres_custombundle/SnavelyReprojectionError.h:27:132:   required from here
/usr/local/include/ceres/sized_cost_function.h:53:55: error: non-constant condition for static assertion
   53 |   static_assert(internal::StaticParameterDims::kIsValid,
      |                                                       ^~~~~~~~
In file included from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/autodiff.h: In instantiation of ‘bool ceres::internal::AutoDifferentiate(const Functor&, const T* const*, int, T*, T**) [with int kNumResiduals = 2; ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/autodiff_cost_function.h:210:69:   required from ‘bool ceres::AutoDiffCostFunction::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8:   required from here
/usr/local/include/ceres/internal/autodiff.h:315:9: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  315 |   using Parameters = typename ParameterDims::Parameters;
      |         ^~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:348:47: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  348 |   Make1stOrderPerturbations::Apply(parameters,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
  349 |                                                parameters_as_jets.data());
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/autodiff.h:357:39: error: no type named ‘Parameters’ in ‘class ceres::internal::ParameterDims’
  357 |   Take1stOrderParts::Apply(
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  358 |       num_outputs, residuals_as_jets.data(), jacobians);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ceres/internal/autodiff.h:152,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/boy/slambook/ch10/ceres_custombundle/ceresBundle.cpp:4:
/usr/local/include/ceres/internal/variadic_evaluate.h: In instantiation of ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T* const*, T*, const void*) [with ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’:
/usr/local/include/ceres/internal/variadic_evaluate.h:108:45:   required from ‘bool ceres::internal::VariadicEvaluate(const Functor&, const T* const*, T*) [with ParameterDims = ceres::internal::ParameterDims; Functor = SnavelyReprojectionError; T = double]’
/usr/local/include/ceres/autodiff_cost_function.h:207:55:   required from ‘bool ceres::AutoDiffCostFunction::Evaluate(const double* const*, double*, double**) const [with CostFunctor = SnavelyReprojectionError; int kNumResiduals = 2; int ...Ns = {9, 3}]’
/usr/local/include/ceres/autodiff_cost_function.h:200:8:   required from here
/usr/local/include/ceres/internal/variadic_evaluate.h:80:65: error: ‘ParameterBlockIndices’ was not declared in this scope
   80 |       functor, input, output, IsDynamic(), ParameterBlockIndices());
      |                                            ~~~~~~~~~~~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/ceres_customBundle.dir/build.make:63:CMakeFiles/ceres_customBundle.dir/ceresBundle.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:81:CMakeFiles/ceres_customBundle.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2

错误原因:CMakeLists.txt文件错误,要用c++14编译。


所以讲文件中c++11改为c++14即可

 修改后,编译成功。


 

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/langs/634841.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-04-16
下一篇2022-04-16

发表评论

登录后才能评论

评论列表(0条)

    保存