Ask Your Question

OpenCV 3.0 problems building dlls and libs

asked 2014-10-16 18:49:12 -0500

Echo88 gravatar image

Ive downloaded OpenCV3.0 via Github and TortoiseGit from and build it via CMake without problems. Then I tried to compile it via MSVC11 2012 on my Win7 64bit-pc by opening OpenCV.sln and generating the Debug and Release-DLLs/Libs by pressing F7. opencv_cudev300d.dll/opencv_cudev300.dll and opencv_cudev300.lib/opencv_cudev300d.lib got built successfully, but after that i get mainly two errors: LNK1104: File "....\lib\Debug\opencv_core300d.lib" cannot be opened and MSB6006 cmd.exe gets executed with code 1

Anyone can help me out?

edit retag flag offensive close merge delete


Do you use cmake defualt value? I think maybe you should check and try all options.

wuling gravatar imagewuling ( 2014-10-16 19:05:27 -0500 )edit

You should try new version of Cmake ( to see if the problem is solved.

tuannhtn gravatar imagetuannhtn ( 2014-10-16 22:19:01 -0500 )edit

Are you sure that the CMAKE config is building for 64 bit and not for 32 bit systems? Just a guess!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-17 04:10:39 -0500 )edit

I always thought my MSVC 2012 Express-Installation covers 64Bit-Code, but after your comments i learned that it only covers 32Bit. I once again built the DLLs and Libs with 32Bit and it all runs fine, thanks for your help! :) Will also try to include Win 7.1 SDK to get it working with 64Bit.

Echo88 gravatar imageEcho88 ( 2014-10-17 15:10:22 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-16 00:06:47 -0500

bruceyo gravatar image

updated 2015-04-16 03:03:34 -0500

This also happened to me even I upgrade the cmake version to 3.2.2. My notebook developing environment is win8.1, VS2013 Ultimate, 64bit. I choose the Visual Studio 12 2013 Win64 generator.

After Click Configure, the information is as below:

found IPP (ICV version): 8.2.1 [8.2.1]
at: D:/software/OpenCV/opencv-master/3rdparty/ippicv/unpack/ippicv_win
CUDA detected: 6.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_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Found PythonInterp: E:/Program Files (x86)/python34/python.exe (found suitable version "3.4.2", minimum required is "2.7") 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'numpy'

Found PythonInterp: E:/Program Files (x86)/python34/python.exe (found suitable version "3.4.2", minimum required is "3.4") 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'numpy'

'E:\Program' is not recognized as an internal or external command,
operable program or batch file.

Error: MEXEXT: Unsupported platform. 

VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file

General configuration for OpenCV 3.0.0-dev =====================================
  Version control:               unknown

    Host:                        Windows 6.2 AMD64
    CMake:                       3.2.2
    CMake generator:             Visual Studio 12 2013 Win64
    CMake build tool:            C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe
    MSVC:                        1800

    Built as dynamic libs?:      YES
    C++ Compiler:                E:/Program Files (x86)/Visual Studio 2013/VC/bin/x86_amd64/cl.exe  (ver 18.0.30723.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 /Oi  /wd4251 /wd4324 /MP4  /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 /wd4324 /MP4  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  E:/Program Files (x86)/Visual Studio 2013/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    /MP4  /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    /MP4  /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:                 hal cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 androidcamera java python2 python3 viz

  Windows RT ...
edit flag offensive delete link more


Actually your error is pure due to your path to your linker files not being correct. Can you replace the ..\..\ which is a relative location to an absolute location like C:\test\lib\ for example?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-16 02:24:37 -0500 )edit

When I not check the WITH_CUDA, MSVC2013 build the master-opencv successfully. What cuda toolkit version should I use? I am using the Cuda6.5 now. @StevenPuttemans

bruceyo gravatar imagebruceyo ( 2015-04-16 02:34:07 -0500 )edit

That should not matter. It seems that there is something wrong with the cuda branch then ... could you try to isolate the package that is giving you the error?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-16 06:07:03 -0500 )edit

Please refer to the question in the link: link text Thanks

bruceyo gravatar imagebruceyo ( 2015-04-16 21:00:32 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-10-16 18:49:12 -0500

Seen: 1,254 times

Last updated: Apr 16 '15