Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I can only guess that you are not linking correctly. But without knowing your Cmake-file it's kind hard. An example cmake-file (maybe the last line is missing?):

project(Test)
cmake_minimum_required(VERSION 2.8)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

find_package(Qt4 REQUIRED)
if(QT_FOUND)
include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR})
endif(QT_FOUND)

find_package( OpenCV REQUIRED )
if( OpenCV_FOUND )
list( APPEND ThirdParty_LIBS ${OpenCV_LIBS} )
    include_directories( ${OpenCV_INCLUDE_DIRS} )
endif( OpenCV_FOUND )

# c++11 support
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(${PROJECT_NAME}_SRC test.cpp mainwindow.cpp)
set(${PROJECT_NAME}_HDR test.h mainwindow.h)
set(${PROJECT_NAME}_FORMS mainwindow.ui)

QT4_WRAP_CPP(${PROJECT_NAME}_HDR_MOC ${${PROJECT_NAME}_HDR})
QT4_WRAP_UI(${PROJECT_NAME}_FORMS_HDR ${${PROJECT_NAME}_FORMS})

add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SRC} ${${PROJECT_NAME}_HDR_MOC} ${${PROJECT_NAME}_FORMS_HDR} )
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

Btw. shouldn't it be:

detector = cv::Ptr(new cv::BriskFeatureDetector(60,4))