Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Compiling error: undefined references to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]() #195

@Yamin05114

Description

@Yamin05114

Hi, I have this problem during compiling, thanks in advance!

[ 45%] Linking CXX executable ../bin/simple_bundle_adjuster
../lib/libceres.a(problem_impl.cc.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, int>(int const&, int const&, char const*)':
problem_impl.cc:(.text._ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIiiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x50): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
../lib/libceres.a(problem_impl.cc.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)':
problem_impl.cc:(.text._ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x51): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
../lib/libceres.a(problem_impl.cc.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<ceres::internal::ParameterBlock*, ceres::internal::ParameterBlock*>(ceres::internal::ParameterBlock* const&, ceres::internal::ParameterBlock* const&, char const*)':
problem_impl.cc:(.text._ZN6google17MakeCheckOpStringIPN5ceres8internal14ParameterBlockES4_EEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIPN5ceres8internal14ParameterBlockES4_EEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x51): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
../lib/libceres.a(triplet_sparse_matrix.cc.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<double, double>(double const&, double const&, char const*)':
triplet_sparse_matrix.cc:(.text._ZN6google17MakeCheckOpStringIddEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIddEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x54): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
../lib/libceres.a(compressed_row_sparse_matrix.cc.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<int, unsigned long>(int const&, unsigned long const&, char const*)':
compressed_row_sparse_matrix.cc:(.text._ZN6google17MakeCheckOpStringIimEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringIimEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x51): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
../lib/libceres.a(compressed_row_sparse_matrix.cc.o):compressed_row_sparse_matrix.cc:(.text._ZN6google17MakeCheckOpStringImiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImiEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x50): more undefined references to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()' follow
collect2: error: ld returned 1 exit status
examples/CMakeFiles/simple_bundle_adjuster.dir/build.make:114: recipe for target 'bin/simple_bundle_adjuster' failed
make[2]: *** [bin/simple_bundle_adjuster] Error 1
CMakeFiles/Makefile2:3283: recipe for target 'examples/CMakeFiles/simple_bundle_adjuster.dir/all' failed
make[1]: *** [examples/CMakeFiles/simple_bundle_adjuster.dir/all] Error 2
[ 45%] Linking CXX static library ../../lib/libtest_util.a
[ 45%] Built target test_util
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions