HuajianUP / Photo-SLAM

[CVPR 2024] Photo-SLAM: Real-time Simultaneous Localization and Photorealistic Mapping for Monocular, Stereo, and RGB-D Cameras
GNU General Public License v3.0
425 stars 40 forks source link

An error occurred when compiling #9

Closed zefengzhang123 closed 5 months ago

zefengzhang123 commented 6 months ago

/usr/bin/ld: CMakeFiles/train_colmap.dir/examples/train_colmap.cpp.o: in function readColmapImagesBinary(std::shared_ptr<GaussianMapper>, std::filesystem::path const&, std::filesystem::path const&)': train_colmap.cpp:(.text+0x1369): undefined reference tocv::imread(std::string const&, int)' /usr/bin/ld: CMakeFiles/train_colmap.dir/examples/train_colmap.cpp.o: in function readColmapCamerasBinary(std::shared_ptr<GaussianMapper>, std::filesystem::path const&)': train_colmap.cpp:(.text+0x4061): undefined reference tocv::error(int, std::string const&, char const, char const, int)' /usr/bin/ld: train_colmap.cpp:(.text+0x4098): undefined reference to cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: train_colmap.cpp:(.text+0x40cf): undefined reference tocv::error(int, std::string const&, char const, char const, int)' /usr/bin/ld: train_colmap.cpp:(.text+0x4113): undefined reference to cv::error(int, std::string const&, char const*, char const*, int)' /usr/bin/ld: /home/zzf/Photo-SLAM/lib/libgaussian_viewer.so: undefined reference tocv::FileStorage::FileStorage(std::string const&, int, std::string const&)' /usr/bin/ld: /home/zzf/Photo-SLAM/lib/libgaussian_mapper.so: undefined reference to Json::Value::Value(std::string const&)' /usr/bin/ld: /home/zzf/Photo-SLAM/lib/libgaussian_mapper.so: undefined reference tocv::FileNode::string() const' /usr/bin/ld: /home/zzf/Photo-SLAM/lib/libgaussian_mapper.so: undefined reference to cv::imwrite(std::string const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' collect2: error: ld returned 1 exit status /usr/bin/ld: CMakeFiles/tum_rgbd.dir/examples/tum_rgbd.cpp.o: in functionmain': tum_rgbd.cpp:(.text.startup+0xf48): undefined reference to cv::imread(std::string const&, int)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x1081): undefined reference tocv::imread(std::string const&, int)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x1296): undefined reference to ORB_SLAM3::System::TrackRGBD(cv::Mat const&, cv::Mat const&, double const&, std::vector<ORB_SLAM3::IMU::Point, std::allocator<ORB_SLAM3::IMU::Point> > const&, std::string)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x165f): undefined reference toORB_SLAM3::System::SaveTrajectoryTUM(std::string const&)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x16dc): undefined reference to ORB_SLAM3::System::SaveKeyFrameTrajectoryTUM(std::string const&)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x1759): undefined reference toORB_SLAM3::System::SaveTrajectoryEuRoC(std::string const&)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x17ed): undefined reference to ORB_SLAM3::System::SaveKeyFrameTrajectoryEuRoC(std::string const&)' /usr/bin/ld: tum_rgbd.cpp:(.text.startup+0x186a): undefined reference toORB_SLAM3::System::SaveTrajectoryKITTI(std::string const&)' /usr/bin/ld: CMakeFiles/tum_rgbd.dir/examples/tum_rgbd.cpp.o: in function std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ORB_SLAM3::System, std::allocator<ORB_SLAM3::System>, char*&, char*&, ORB_SLAM3::System::eSensor>(ORB_SLAM3::System*&, std::_Sp_alloc_shared_tag<std::allocator<ORB_SLAM3::System> >, char*&, char*&, ORB_SLAM3::System::eSensor&&)': tum_rgbd.cpp:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN9ORB_SLAM36SystemESaIS5_EJRPcS8_NS5_7eSensorEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC5IN9ORB_SLAM36SystemESaIS5_EJRPcS8_NS5_7eSensorEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_]+0x104): undefined reference toORB_SLAM3::System::System(std::string const&, std::string const&, ORB_SLAM3::System::eSensor, int, std::string const&)'

liquorleaf commented 6 months ago

Looks like the same problem with #2. Have you tried this Docker?