OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

CMake Error: Cannot find source file: testing_main.cc,gtest

Open brz-hub opened this issue 10 months ago • 4 comments

I cloned the repository code:

git clone --recursive https://github.com/mapillary/OpenSfM

And installed the required dependencies. However, I encountered issues with missing files during the build process:

  1. Missing src/third/gtest
    The entire library file was not downloaded.

  2. Missing src/testing_main.cc

3.Missing source "No SOURCES given to target: src/third_party/vlfeat/vl

I found the gtest files in the 0.5.1 release version, but I couldn't find testing_main.cc.

Image

brz-hub avatar Mar 11 '25 03:03 brz-hub

Hi! Check this issue https://github.com/mapillary/OpenSfM/issues/1078. As far as I know, they deleted a couple of important files at this point and no one is adding them to the source code. You should have access to testing_main.cc in commit ef872b2399cf1cc036d91e950f210a7be33c2745.

Try it and if you need anything more feel free to ask!

vgutierrez2404 avatar Mar 11 '25 08:03 vgutierrez2404

Hi! Check this issue #1078. As far as I know, they deleted a couple of important files at this point and no one is adding them to the source code. You should have access to testing_main.cc in commit ef872b2.

Try it and if you need anything more feel free to ask!

Thank you so much! I found the missing file and compiled and installed it. During this process, I encountered other issues, which were resolved after setting the version of Ceres Solver to 2.0.0 and enabling the C++17 standard. Wishing you a pleasant life!

brz-hub avatar Mar 12 '25 09:03 brz-hub

Hi! Check this issue #1078. As far as I know, they deleted a couple of important files at this point and no one is adding them to the source code. You should have access to testing_main.cc in commit ef872b2. Try it and if you need anything more feel free to ask!

Thank you so much! I found the missing file and compiled and installed it. During this process, I encountered other issues, which were resolved after setting the version of Ceres Solver to 2.0.0 and enabling the C++17 standard. Wishing you a pleasant life!

Can you please explain how to Ceres Solver to 2.0.0 and enabling the C++17 standard? (using Win 11, anaconda prompt, not sure if it is relevant)

richardrevesz avatar Mar 14 '25 21:03 richardrevesz

Hi! Check this issue #1078. As far as I know, they deleted a couple of important files at this point and no one is adding them to the source code. You should have access to testing_main.cc in commit ef872b2. Try it and if you need anything more feel free to ask!

Thank you so much! I found the missing file and compiled and installed it. During this process, I encountered other issues, which were resolved after setting the version of Ceres Solver to 2.0.0 and enabling the C++17 standard. Wishing you a pleasant life!

Can you please explain how to Ceres Solver to 2.0.0 and enabling the C++17 standard? (using Win 11, anaconda prompt, not sure if it is relevant)

I suggest compiling the project in a Linux environment rather than a Windows environment. If you want to compile the project in a Windows environment, you can follow what the official tutorial says.

Whether in the Windows environment or the Linux environment: Which C++ standard to use is set in CMakeLists.txt. You can search for "How to install cere-solver 2.0.0" on Google, Baidu, and Bing.

brz-hub avatar Mar 15 '25 04:03 brz-hub