我有一个用C编写的项目,而不是我。在这个项目中有一个文件夹,其中有一个用C ++编写的例子。我应该使用这个例子,因此我写了一个CMakeLists.txt来包含我需要的所有东西。一切正在发挥作用,但是新的制作,cmake和qtcreator我有一些困难。
我无法理解原因:
编辑:
cmake_minimum_required(VERSION 2.8)
project( opencvAprilTagFlea )
find_package( OpenCV REQUIRED )
find_package(VISP REQUIRED)
include_directories("/home/fschiano/Repositories/apriltag2")
include_directories("/home/fschiano/Repositories/apriltag2/common")
find_library(FLYCAPTURE2 flycapture)
add_executable( opencvDemo opencv_demo.cc )
include_directories(${VISP_INCLUDE_DIRS})
message(STATUS "${VISP_INCLUDE_DIRS}")
message(STATUS "${VISP_LIBRARIES}")
# Needed libraries
set (EXTRA_LIBS ${EXTRA_LIBS} apriltag flycapture ${OpenCV_LIBS} ${VISP_LIBRARIES})
target_link_libraries( opencvDemo ${EXTRA_LIBS} )
在qtcreator中,它无法识别以下内容:
#include "visp/vpDisplayGDI.h"
#include <visp/vpDisplayX.h>
#include <visp/vpDot2.h>
#include <visp/vpImageIo.h>
#include <visp/vpPixelMeterConversion.h>
#include <visp/vpPose.h>
#include <visp/vpPoint.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "flycapture/FlyCapture2.h"
#include <iostream>
#include "opencv2/opencv.hpp"
#include "apriltag.h"
#include "tag36h11.h"
#include "tag36h10.h"
#include "tag36artoolkit.h"
#include "tag25h9.h"
#include "tag25h7.h"
#include "tag16h5.h"
先谢谢你的帮助, 法布里奇奥。