已解决Makefile:83:recipe for target ‘all‘ failed

  • Post author:
  • Post category:其他


已解决


CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/stereoVision.dir/all’ failed

Makefile:83:recipe for target ‘all’ failed


CMakeFiles/stereoVision.dir/build.make:62: recipe for target ‘CMakeFiles/stereoVision.dir/stereoVision.cpp.o’ failed

make[2]: *** [CMakeFiles/stereoVision.dir/stereoVision.cpp.o] Error 1

CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/stereoVision.dir/all’ failed

make[1]: *** [CMakeFiles/stereoVision.dir/all] Error 2

Makefile:83: recipe for target ‘all’ failed

make: *** [all] Error 2

问题:

解决办法就是:查看你的cmake .. 后上面的一些错误提示和警告,基本上是CMakeLists.txt中的一些库是否链接好了


例如我当时的CMakeLists.txt:

set(CMAKE_CXX_FLAGS"-std=c++11")
cmake_minimum_required(VERSION 3.10)

project(stereoVision)
find_package(OpenCV REQUIRED)

#添加头文件
include_directories(${OpenCV_INCLUDE_DIRS})

find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})

# 链接OpenCV库
add_executable(stereoVision stereoVision.cpp)
target_link_libraries(stereoVision ${OpenCV_LIBS} ${Pangolin_LIBRARIES})



版权声明:本文为qq_36955294原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。