OpenCV 2.4.6 Build/link errors with CUDA and OpenGL
I'm getting the following build errors for OpenCV version 2.4.6 for "Visual Studio 10 Win64" with both WITH_OPENGL and WITH_OPENCV specified. Anyone know what I'm doing wrong?
Link Errors:
5> Creating library C:/opencv/gpubuildwithopengl/lib/Debug/opencv_highgui246d.lib and object C:/opencv/gpubuildwithopengl/lib/Debug/opencv_highgui246d.exp
5>window.obj : error LNK2019: unresolved external symbol cvSetOpenGlDrawCallback referenced in function "void __cdecl cv::setOpenGlDrawCallback(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,void (__cdecl*)(void *),void *)" (?setOpenGlDrawCallback@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@P6AXPEAX@Z1@Z)
5>window.obj : error LNK2019: unresolved external symbol cvSetOpenGlContext referenced in function "void __cdecl cv::setOpenGlContext(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?setOpenGlContext@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
5>window.obj : error LNK2019: unresolved external symbol cvUpdateWindow referenced in function "void __cdecl cv::updateWindow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?updateWindow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
5>C:\opencv\gpubuildwithopengl\bin\Debug\opencv_highgui246d.dll : fatal error LNK1120: 3 unresolved externals
The OpenCV configuration is below:
CUDA detected: 5.5
CUDA NVCC target flags: -gencode;arch=compute_11,code=sm_11;-gencode;arch=compute_12,code=sm_12;-gencode;arch=compute_13,code=sm_13;-gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_20,code=compute_20;-gencode;arch=compute_30,code=compute_30
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
General configuration for OpenCV 2.4.6 =====================================
Version control: unknown
Platform:
Host: Windows 6.1 AMD64
CMake: 2.8.11.2
CMake generator: Visual Studio 10 Win64
CMake build tool: c:/PROGRA~2/MICROS~2.0/Common7/IDE/devenv.com
MSVC: 1600
C/C++:
Built as dynamic libs?: YES
C++ Compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe (ver 16.0.40219.1)
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 /Oi /wd4251 /MD /O2 /Ob2 /D NDEBUG /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 /Oi /wd4251 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
C Compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/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 /Oi /MD /O2 /Ob2 /D NDEBUG /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 /Oi /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
Precompiled headers: YES
OpenCV modules:
To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib photo legacy gpu ocl nonfree stitching superres ts videostab
Disabled: world
Disabled by dependency: -
Unavailable: androidcamera java python
GUI:
QT: NO
Win32 UI: YES
OpenGL support: YES ...
You have set the path for bin directory of CUDA, in environment variables?