While building opencv_world as a DLL, Visual Studio shows me 31 linkage errors:
Error 28 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall GuiReceiver::metaObject(void)const " (?metaObject@GuiReceiver@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 29 error LNK2001: unresolved external symbol "public: virtual void * __thiscall GuiReceiver::qt_metacast(char const *)" (?qt_metacast@GuiReceiver@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 30 error LNK2001: unresolved external symbol "public: virtual int __thiscall GuiReceiver::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@GuiReceiver@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 31 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvButtonbar::metaObject(void)const " (?metaObject@CvButtonbar@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 32 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvButtonbar::qt_metacast(char const *)" (?qt_metacast@CvButtonbar@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 33 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvButtonbar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvButtonbar@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 34 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvPushButton::metaObject(void)const " (?metaObject@CvPushButton@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 35 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvPushButton::qt_metacast(char const *)" (?qt_metacast@CvPushButton@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 36 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvPushButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvPushButton@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 37 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvCheckBox::metaObject(void)const " (?metaObject@CvCheckBox@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 38 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvCheckBox::qt_metacast(char const *)" (?qt_metacast@CvCheckBox@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 39 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvCheckBox::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvCheckBox@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 40 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvRadioButton::metaObject(void)const " (?metaObject@CvRadioButton@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 41 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvRadioButton::qt_metacast(char const *)" (?qt_metacast@CvRadioButton@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 42 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvRadioButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvRadioButton@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 43 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvTrackbar::metaObject(void)const " (?metaObject@CvTrackbar@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 44 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvTrackbar::qt_metacast(char const *)" (?qt_metacast@CvTrackbar@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 45 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvTrackbar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvTrackbar@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 46 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvWinProperties::metaObject(void)const " (?metaObject@CvWinProperties@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 47 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvWinProperties::qt_metacast(char const *)" (?qt_metacast@CvWinProperties@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 48 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvWinProperties::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvWinProperties@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 49 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvWindow::metaObject(void)const " (?metaObject@CvWindow@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 50 error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvWindow::qt_metacast(char const *)" (?qt_metacast@CvWindow@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 51 error LNK2001: unresolved external symbol "public: virtual int __thiscall CvWindow::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 52 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall DefaultViewPort::metaObject(void)const " (?metaObject@DefaultViewPort@@UBEPBUQMetaObject@@XZ) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 53 error LNK2001: unresolved external symbol "public: virtual void * __thiscall DefaultViewPort::qt_metacast(char const *)" (?qt_metacast@DefaultViewPort@@UAEPAXPBD@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 54 error LNK2001: unresolved external symbol "public: virtual int __thiscall DefaultViewPort::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@DefaultViewPort@@UAEHW4Call@QMetaObject@@HPAPAX@Z) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 55 error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvButtonbar::staticMetaObject" (?staticMetaObject@CvButtonbar@@2UQMetaObject@@B) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 56 error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvTrackbar::staticMetaObject" (?staticMetaObject@CvTrackbar@@2UQMetaObject@@B) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 57 error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvWindow::staticMetaObject" (?staticMetaObject@CvWindow@@2UQMetaObject@@B) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 58 error LNK2001: unresolved external symbol "public: static struct QMetaObject const DefaultViewPort::staticMetaObject" (?staticMetaObject@DefaultViewPort@@2UQMetaObject@@B) D:\progs\lib\OpenCV\3.1\build_withQt\modules\world\window_QT.obj opencv_world
Error 59 error LNK1120: 31 unresolved externals D:\progs\lib\OpenCV\3.1\build_withQt\bin\Debug\opencv_world310d.dll opencv_world
I tried to force add the qtmaind.lib as input library, but it was unsuccessful.
Cmake config log:
found IPP (ICV version): 9.0.1 [9.0.1]
at: D:/progs/lib/OpenCV/3.1/sources/3rdparty/ippicv/unpack/ippicv_win
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.2", minimum required is "2.7")
Found PythonLibs: C:/Python27/libs/python27.lib (found suitable exact version "2.7.2")
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named numpy.distutils
Found PythonInterp: D:/progs/Python 3.4/python.exe (found suitable version "3.4.3", minimum required is "3.4")
Found PythonLibs: D:/progs/Python 3.4/libs/python34.lib (found suitable exact version "3.4.3")
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Processing WORLD modules...
module opencv_core...
module opencv_cudaarithm...
module opencv_flann...
module opencv_imgproc...
module opencv_ml...
module opencv_video...
module opencv_cudabgsegm...
module opencv_cudafilters...
module opencv_cudaimgproc...
module opencv_cudawarping...
module opencv_imgcodecs...
module opencv_photo...
module opencv_shape...
module opencv_videoio...
module opencv_cudacodec...
module opencv_cudaoptflow...
module opencv_highgui...
module opencv_objdetect...
module opencv_superres...
module opencv_cudaobjdetect...
module opencv_features2d...
module opencv_calib3d...
module opencv_cudafeatures2d...
module opencv_cudastereo...
module opencv_stitching...
module opencv_videostab...
Processing WORLD modules... DONE
Processing module opencv_ts...
CMake Warning (dev) in modules/world/CMakeLists.txt:
Policy CMP0020 is not set: Automatically link Qt executables to qtmain
target on Windows. Run "cmake --help-policy CMP0020" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
General configuration for OpenCV 3.1.0 =====================================
Version control: unknown
Platform:
Host: Windows 6.3.9600 AMD64
CMake: 3.6.1
CMake generator: Visual Studio 12 2013
CMake build tool: C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe
MSVC: 1800
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe (ver 18.0.40629.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /arch:SSE2 /Oi /fp:fast /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:X86 /debug /INCREMENTAL
Precompiled headers: YES
Extra dependencies: vfw32 comctl32 gdi32 ole32 setupapi ws2_32 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent Qt5::OpenGL glu32 opengl32
3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf
OpenCV modules:
To be built: core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec cudaoptflow highgui objdetect superres cudaobjdetect features2d calib3d cudafeatures2d cudastereo stitching videostab world ts
Disabled: -
Disabled by dependency: -
Unavailable: cudalegacy cudev java python2 viz
Windows RT support: NO
GUI:
QT 5.x: YES (ver 5.5.0)
QT OpenGL support: YES (Qt5::OpenGL 5.5.0)
OpenGL support: YES (glu32 opengl32)
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.8)
JPEG: build (ver 90)
WEBP: build (ver 0.3.1)
PNG: build (ver 1.6.19)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
GDAL: NO
Video I/O:
Video for Windows: YES
DC1394 1.x: NO
DC1394 2.x: NO
FFMPEG: YES (prebuilt binaries)
codec: YES (ver 56.41.100)
format: YES (ver 56.36.101)
util: YES (ver 54.27.100)
swscale: YES (ver 3.1.101)
resample: NO
gentoo-style: YES
GStreamer: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
OpenNI2: NO
PvAPI: NO
GigEVisionSDK: NO
DirectShow: YES
Media Foundation: NO
XIMEA: NO
Intel PerC: NO
Parallel framework: Concurrency
Other third-party libraries:
Use IPP: 9.0.1 [9.0.1]
at: D:/progs/lib/OpenCV/3.1/sources/3rdparty/ippicv/unpack/ippicv_win
Use IPP Async: NO
Use Eigen: NO
Use Cuda: NO
Use OpenCL: YES
Use custom HAL: NO
OpenCL:
Version: dynamic
Include path: D:/progs/lib/OpenCV/3.1/sources/3rdparty/include/opencl/1.2
Use AMDFFT: NO
Use AMDBLAS: NO
Python 2:
Interpreter: C:/Python27/python.exe (ver 2.7.2)
Python 3:
Interpreter: D:/progs/Python 3.4/python.exe (ver 3.4.3)
Libraries: NO
numpy: D:/progs/Python 3.4/lib/site-packages/numpy/core/include (ver 1.9.2)
packages path: D:/progs/Python 3.4/Lib/site-packages
Python (for build): C:/Python27/python.exe
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab: NO
Documentation:
Doxygen: D:/progs/Utils/doxygen/bin/doxygen.exe (ver 1.8.10)
PlantUML: NO
Tests and samples:
Tests: YES
Performance tests: YES
C/C++ Examples: YES
Install path: D:/progs/lib/OpenCV/3.1/build_withQt/install
cvconfig.h is in: D:/progs/lib/OpenCV/3.1/build_withQt
-----------------------------------------------------------------
Configuring done
CMake config (only toggled flags): WITH_QT, WITH_OPENGL, BUILD_opencv_world