The reason for this problem is that there is a difference between the C++ versions.
Momotonic_clock is no longer available in C++11, there is steady_clock instead.
I got the solution from Stack Overflow.
So the author of orb-slam used ifdef in the code to determine the user’s C++ version:
#ifdef COMPILEDWITHC11
std::chrono::steady_clock::time_point t1 = std::chrono::steady_clock::now();
#else
std::chrono::monotonic_clock::time_point t1 = std::chrono::monotonic_clock::now();
#endif
//Pass the image to the SLAM system
SLAM.TrackMonocular(im,tframe);
#ifdef COMPILEDWITHC11
std::chrono::steady_clock::time_point t2 = std::chrono::steady_clock::now();
#else
std::chrono::monotonic_clock::time_point t2 = std::chrono::monotonic_clock::now();
#endif
But this part of monotonic_clock will still report an error!
If you report an error in this part, there is a high probability that your C++ is version 11, then we can actually delete this part of the judgment statement and keep only
std::chrono::steady_clock::time_point t1 = std::chrono::steady_clock::now();
//Pass the image to the SLAM system
SLAM.TrackMonocular(im,tframe);
std::chrono::steady_clock::time_point t2 = std::chrono::steady_clock::now();
//......
This part is fine. After deleting the code of monotonic_clock, it can be compiled normally!
Read More:
- [Solved] gocad2017 Install error: The installation of MSVC_2010_SP1_x64_32bit has failed.
- [Solved] Acrobat DC 2022 Install Error: Cannot Install Acrobat Update Service
- Use Maven install to type the war package, which shows that the package XXX does not exist
- How to install PIL in Python 3
- How To Install WordPress with LAMP on Ubuntu 16.04
- Debian: How to install MariaDB
- Yaml Install ERROR: Cannot uninstall ‘PyYAML’.
- How to Install FFmpeg on Linux
- How to Install PSSH in Centos7
- Mydumper Install Error: None of the required ‘glib-2.0’/’gthread-2.0’ found
- How To Install Java with Apt-Get on Ubuntu 16.04
- Raspberry PI install VIM editor
- Install MySQL ODBC connector prompt error 1918 perfect solution (non installation of VC + + library method)
- How to Install MongoDB Community Edition Manually on mac and linux
- How to Solve program install error 0x80070660
- How to Sole cmd Install typeScript Error
- COLMAP Install Error: Undefined reference to libtiff4.0 [Solved]
- Solve the error of jupyter labextension install
- Macos: How to Solve cocoapods Install Error
- [Solved] faiss Failed to install Error: No version of faiss found that meets the requirements