opencv-2-4-13与Ubuntu 16.04不兼容

时间:2019-07-03 12:29:16

标签: opencv ubuntu

我在ubuntu 16.04上安装了opencv-2.-4-13。但是,当我尝试使用cmake编译cmakefile时,出现以下错误。我在网上尝试了许多建议,但无济于事。我不是ubuntu或opencv的专家。我已经将下面的错误和我的cmakeefile粘贴了。尝试使用cmake ..

进行编译时,请参见下面命令终端上的错误显示。
CMake Warning at /home/lekan/opencv-2.4.13/cmake/OpenCVConfig.cmake:163 (message):
  Found OpenCV Windows Pack but it has not binaries compatible with your
  configuration.

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
  library.
Call Stack (most recent call first):
  CMakeLists.txt:8 (FIND_PACKAGE)


CMake Error at CMakeLists.txt:8 (FIND_PACKAGE):
  Found package configuration file:

    /home/lekan/opencv-2.4.13/cmake/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.


-- Configuring incomplete, errors occurred!

另请参阅下面的cmakefile:

cmake_minimum_required(VERSION 2.8)

SET ( EXECUTABLE pippo )

# UNCOMMENT FOR GRAPHICS
add_definitions(-D_GRAPHICS_)

FIND_PACKAGE( OpenCV REQUIRED )
FIND_PACKAGE( Qt COMPONENTS QtOpenGL REQUIRED )
FIND_PACKAGE( Qt4 REQUIRED )
SET( QT_USE_QTOPENGL TRUE )
SET(  QT_USE_QTXML TRUE )
INCLUDE( ${QT_USE_FILE} )

FILE ( GLOB SOURCES ./*.cpp ./MISC/*.cpp ./EVOL_ALGORITHM/*.cpp ./ROB_SENSORS_OBJS/*.cpp ./EXP/*.cpp ./CONTROLLERS/*.cpp ./EXP/RENDERING/*.cpp)  
FILE ( GLOB HEADERS ./*.h ./MISC/*.h ./EVOL_ALGORITHM/*.h ./ROB_SENSORS_OBJS/*.cpp ./EXP/*.h ./CONTROLLERS/*.h ./EXP/RENDERING/*.h)
FILE ( GLOB UIS ./*.ui ./EXP/RENDERING/*.ui)

QT4_WRAP_CPP( SOURCES ${HEADERS} )
QT4_WRAP_UI( SOURCES  ${UIS} )
FIND_PACKAGE ( GLUT )  
FIND_PACKAGE ( OpenGL )

INCLUDE_DIRECTORIES( ${OpenCV_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} /usr/include/ /usr/local/include/ /usr/local/qwt-6.1.1-svn/include/ ${CMAKE_CURRENT_BINARY_DIR} ./EXP/RENDERING /usr/local/include/opencv2/ )
# UNCOMMENT FOR GRAPHICS

ADD_EXECUTABLE( ${EXECUTABLE} ${SOURCES})

# UNCOMMENT FOR GRAPHICS
TARGET_LINK_LIBRARIES( ${EXECUTABLE} ${OpenCV_LIBS} ${OPENGL_glu_LIBRARY}  ${GLUT_LIBRARIES} -lGL -lGLU  ${QT_LIBRARIES} )#revel xvidcore
TARGET_LINK_LIBRARIES( ${EXECUTABLE} "-L/sw/lib -lgsl -lgslcblas -lm -L/usr/local/qwt-6.1.1-svn/lib" )
# UNCOMMENT FOR GRAPHICS

0 个答案:

没有答案