###前提・実現したいこと
VisualStudio2013でOpenCV3.1を使いたいと思っています。
OSはWindows10で、CMakeを使ってCUDAやTBB、Qt、VTKなどの設定を行いました。
CMakeの段階では特に問題なくgenerateできていそうなのですが、ALL_BUILDのところでリンクエラーが起きてしまいます。
###発生している問題・エラーメッセージ
… 5>LINK : fatal error LNK1104: ファイル '..\..\lib\Debug\opencv_core310d.lib' を開くことができません。 … 213>LINK : fatal error LNK1104: ファイル '..\..\lib\Debug\opencv_shape310d.lib' を開くことができません。 214>LINK : fatal error LNK1104: ファイル '..\..\lib\Debug\opencv_shape310d.lib' を開くことができません。 215>------ ビルド開始: プロジェクト:ALL_BUILD, 構成:Debug x64 ------ ========== ビルド: 3 正常終了、212 失敗、7 更新不要、0 スキップ ==========
このようにほとんどがエラーとなってしまいます。
###該当のソースコード
以下がCMakeの出力です。
長くて見づらいですが、問題ないのではないかと思います。
FP16: Compiler support is available A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. found IPP (ICV version): 9.0.1 [9.0.1] at: D:/source/opencv/3rdparty/ippicv/unpack/ippicv_win CUDA detected: 7.5 CUDA NVCC target flags: -D_FORCE_INLINES Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) Found VTK ver. 7.1.0 (usefile: D:/source/VTK/CMake/UseVTK.cmake) General configuration for OpenCV 3.1.0-dev ===================================== Version control: 3.1.0-1374-g7f14a27 Platform: Timestamp: 2016-09-23T13:12:28Z Host: Windows 6.2 AMD64 CMake: 3.3.2 CMake generator: Visual Studio 12 2013 Win64 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/x86_amd64/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 /Oi /wd4251 /wd4324 /wd4275 /wd4589 /MP8 /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 /wd4275 /wd4589 /MP8 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.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 /MP8 /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 /MP8 /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 Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Test Qt5::Concurrent vfw32 vtkRenderingOpenGL vtkCommonCore vtksys vtkCommonDataModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkCommonExecutionModel vtkFiltersCore vtkIOImage vtkDICOMParser vtkmetaio vtkzlib vtkjpeg vtkpng vtktiff vtkImagingCore vtkImagingHybrid vtkRenderingCore vtkCommonColor vtkCommonComputationalGeometry vtkFiltersGeneral vtkFiltersGeometry vtkFiltersSources vtkInteractionStyle vtkFiltersExtraction vtkFiltersStatistics vtkImagingFourier vtkalglib vtkRenderingLOD vtkFiltersModeling vtkIOPLY vtkIOCore vtkFiltersTexture vtkRenderingFreeType vtkfreetype vtkIOExport vtkRenderingGL2PS vtkRenderingContext2D vtkRenderingContextOpenGL vtkgl2ps cudart nppc nppi npps cublas cufft -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v7.5/lib/x64 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf OpenCV modules: To be built: cudev core cudaarithm flann imgproc ml video viz cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio cudacodec highgui objdetect ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab Disabled: python3 world Disabled by dependency: - Unavailable: java python2 Windows RT support: NO GUI: QT 5.x: YES (ver 5.7.0) QT OpenGL support: NO OpenGL support: NO VTK support: YES (ver 7.1.0) Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) codec: YES (ver 57.48.101) format: YES (ver 57.41.100) util: YES (ver 55.28.100) swscale: YES (ver 4.1.100) 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: TBB (ver 2017.0 interface 9100) Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: D:/source/opencv/3rdparty/ippicv/unpack/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: YES (ver ..) Use Cuda: YES (ver 7.5) Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO NVIDIA CUDA Use CUFFT: YES Use CUBLAS: YES USE NVCUVID: NO NVIDIA GPU arch: NVIDIA PTX archs: Use fast math: YES OpenCL: <Dynamic loading of OpenCL library> Include path: D:/source/opencv/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO Python 2: Interpreter: NO Python 3: Interpreter: C:/Anaconda3/python.exe (ver 3.5.2) Python (for build): C:/Anaconda3/python.exe Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Matlab: Matlab not found or implicitly disabled Documentation: Doxygen: NO PlantUML: NO Tests and samples: Tests: YES Performance tests: YES C/C++ Examples: YES Install path: D:/build/bin_opencv/install cvconfig.h is in: D:/build/bin_opencv -----------------------------------------------------------------
###試したこと
WITH_CUDAやWITH_QT、WITH_VTKのチェックを外した状態でも同様にエラーが起きてしまうため、これらライブラリの原因ではないと思います。
'D:\build\bin_opencv\lib\Debug\opencv_core310d.lib'は存在しているのですが、エラーメッセージに'....\lib\Debug\opencv_core310d.lib'となっているため、おかしなパスになっているのだと思います。
opencvのCMakefileの問題かと思い、3.1.0の安定板とgithubの開発版どちらも試しましたが変わりませんでした。
解決策をご存知の方いらっしゃいましたら、回答宜しくお願いします。
あなたの回答
tips
プレビュー