Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compiling OpenCV with Qt in VS2013

Hi,

I used this tutorial (https://putuyuwono.wordpress.com/2015/04/23/building-and-installing-opencv-3-0-on-windows-7-64-bit/) 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?