AIBluefisher / DAGSfM

Distributed and Graph-based Structure from Motion. This project includes the official implementation of our Pattern Recognition 2020 paper: Graph-Based Parallel Large Scale Structure from Motion.
https://aibluefisher.github.io/GraphSfM/
BSD 3-Clause "New" or "Revised" License
395 stars 84 forks source link

make error #20

Closed yuancaimaiyi closed 3 years ago

yuancaimaiyi commented 3 years ago

2020-07-12 00-30-09屏幕截图 how to solve it ?thanks @AIBluefisher

AIBluefisher commented 3 years ago

The message shows libgtest is not found in /usr/local/lib. Thus, you can check the directory of libgtest_main.a at first, it could be in /usr/lib.

AIBluefisher commented 3 years ago

Also, I found an issue in the CMakeLists.txt:

message("-- Check for gtest")
find_package(GTest REQUIRED)
if (GTEST_FOUND)
   message("-- Found GTest: ${GTEST_INCLUDE_DIRS}")
   set(GTEST_LIBRARIES ${GTEST_LIBRARIES} 
        /usr/local/lib/libgtest_main.a
        /usr/local/lib/libgtest.a)
#    message("-- Linked Libraries: ${GTEST_LIBRARIES}")
else (GTEST_FOUND)
   message(FATAL_ERROR "Can't find GTest. Please set GTEST_INCLUDE_DIRS & GTEST_LIBRARIES")
endif (GTEST_FOUND)

I have fixed it by replacing ${GTEST_LIBRARIES}, /usr/local/lib/libgtest_main.a and /usr/local/lib/libgtest.a by ${GTEST_MAIN_LIBRARY} and ${GTEST_LIBRARY}. Now you can use the latest version to fix this issue.

AIBluefisher commented 3 years ago

Thanks for proposing this issue.