Ask Your Question
1

Trouble Compiling OpenCV 2.4.6 from source

asked 2013-09-01 13:36:44 -0500

AwooOOoo gravatar image

updated 2013-09-02 03:41:44 -0500

Hi, I've been at this for a while and can't seem to get OpenCV compiled from source for a 64 bit environment so I need some help. CUDA Toolkit 5.5 is installed (64 bit), along with CMake, and Python (ActiveState).

Video Card: Quadro 3000M (Fermi Arch)

Here is the output from Cmake

Checking for Windows Platform SDK
Checking for Visual Studio 2012
CUDA detected: 5.5
CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21

General configuration for OpenCV 2.9.0 =====================================
  Version control:               2.4.6.1-1718-gfc37df0

  Platform:
    Host:                        Windows 6.1 AMD64
    CMake:                       2.8.11.2
    CMake generator:             Visual Studio 11 Win64
    CMake build tool:            C:/PROGRA~2/MICROS~1.0/Common7/IDE/devenv.com
    MSVC:                        1700

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe  (ver 17.0.60315.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 11.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:                 cudev core imgproc highgui flann features2d ml objdetect video calib3d ocl bioinspired contrib gpulegacy gpuarithm gpuwarping gpu legacy gpufilters gpuimgproc gpubgsegm gpucodec gpufeatures2d gpuoptflow gpustereo nonfree optim photo softcascade stitching superres ts videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 androidcamera java python

  Windows RT support:            NO

  GUI: 
    QT:                          NO
    Win32 UI:                    YES
    OpenGL 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.5.12)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)

  Video I/O:
    Video for Windows:           YES
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      codec:                     YES (ver 53.61.100)
      format:                    YES (ver 53.32.100)
      util:                      YES (ver 51.35.100)
      swscale:                   YES (ver 2.1.100)
      gentoo-style:              YES
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO

  Other third-party libraries:
    Use IPP:                     NO
    Use Eigen:                   NO
    Use TBB:                     NO
    Use OpenMP:                  NO
    Use GCD                      NO
    Use Concurrency              YES
    Use C=:                      NO
    Use Cuda:                    YES (ver 5.5)
    Use OpenCL:                  YES

  NVIDIA CUDA
    Use CUFFT:                   YES
    Use CUBLAS:                  NO
    USE NVCUVID:                 NO
    NVIDIA GPU arch:             20 21
    NVIDIA PTX archs:
    Use ...
(more)
edit retag flag offensive close merge delete

Comments

Are you using Visual Studio 2012? Then set CMake variable CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE to OFF.

Vladislav Vinogradov gravatar imageVladislav Vinogradov ( 2013-09-02 00:24:26 -0500 )edit

Thanks Vladislav, but this didn't work.

AwooOOoo gravatar imageAwooOOoo ( 2013-09-02 18:14:11 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-09-22 14:12:40 -0500

Dake Feng gravatar image

It works for me. I am building OpenCV from Git Itseez with WITH_CUDA, cmake+vs2012. Got the link problem that it does not link to the the obj under \modules\core\CMakeFiles\cuda_compile.dir\src\cuda\Debug

By uncheck CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE and regenerate, the problem was solved.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-09-01 13:36:44 -0500

Seen: 1,277 times

Last updated: Sep 22 '13