Compiling OpenCV with Qt in VS2013

asked 2015-09-29 14:48:35 -0600

RetroHelix gravatar image

Hi,

I used this tutorial (https://putuyuwono.wordpress.com/2015...) to build OpenCV 3.0.0 with Qt5.5 and the extra modules from the repo. After creating the VS Studio Solution with CMake I get the following error when building everything in VS2013:

"invalid numeric argument '/Wextra'" in opencv_cvv and opencv_test_cvv in the file "cl".

The full CMakeList.txt looks like this:

if(NOT HAVE_QT5)
  ocv_module_disable(cvv)
  return()
endif()

# we need C++11 and want warnings:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wmissing-declarations)

# Qt5
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
foreach(dt5_dep Core Gui Widgets)
  add_definitions(${Qt5${dt5_dep}_DEFINITIONS})
  include_directories(${Qt5${dt5_dep}_INCLUDE_DIRS})
  list(APPEND CVV_LIBRARIES ${Qt5${dt5_dep}_LIBRARIES})
endforeach()

set(the_description "Debug visualization framework")
ocv_define_module(cvv opencv_core opencv_imgproc opencv_features2d ${CVV_LIBRARIES} WRAP python)

I have configured VS 2013 to be the compiler in CMake. Any Ideas whats wrong?

edit retag flag offensive close merge delete

Comments

I tried to build OpenCV + extra Modules + Qt5.5 with minGW in the hope this would work. It does NOT :) "undefined reference to qwidget..." when running mingw-32 make.

I 'just' want to have the Qt GUI elements in OpenCV. Isn't there an easy way to get this working?

RetroHelix gravatar imageRetroHelix ( 2015-10-01 05:48:21 -0600 )edit