2016-11-18 10 views
4

私はopencv_contribに追加のモジュールをインストールしようとしていますが、CMakeで設定しようとするとエラーが発生します。 githubのからOpenCVはWindowsでCMakeをインストールするopencv_contribモジュール

  1. ダウンロードOpenCVのとopencv_contrib:

    これらは私がこれまでに撮影したステップがあります。

  2. opencv_contribからopencv/modulesに貼り付けたいモジュールを貼り付けました。 OpenCVのにビルドフォルダを作成
  3. 、CMakeのGUIで seen here.
  4. は、私は、Cのソースコードセット:/opencv-3.1.0-devおよびCに含まれるビルドフォルダにビルドフォルダを設定します/ OpenCVの-3.1.0-dev。私はこれを確認し、configureが「私を進めた場合

C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe

  • のconfigureを押した後、私は私がにネイティブCおよびC++コンパイラを指定
  • 15のVisual Studioなどのプロジェクトのための発電機を設定しますこのエラーが発生しました:

    The CXX compiler identification is unknown 
    The C compiler identification is unknown 
    Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe 
    CMake Error: Generator: execution of make failed. Make command was: "MSBuild.exe" "cmTC_7c114.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0" 
    Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken 
    CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message): 
        The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio 
        14.0/VC/bin/cl.exe" is not able to compile a simple test program. 
    
        It fails with the following output: 
    
        Change Dir: C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeTmp 
    
        Run Build Command:"MSBuild.exe" "cmTC_7c114.vcxproj" 
        "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0" 
    
    
        Generator: execution of make failed. Make command was: "MSBuild.exe" 
        "cmTC_7c114.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0" 
    
    
        CMake will not be able to correctly generate this project. 
    Call Stack (most recent call first): 
        CMakeLists.txt:98 (project) 
    
    
    Configuring incomplete, errors occurred! 
    See also "C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeOutput.log". 
    See also "C:/opencv-3.1.0-dev/build/CMakeFiles/CMakeError.log". 
    

    誰かがこれを修正する方法を説明できますか、必要なモジュールを含める別の方法がありますか?

    私は見て回り、管理者としてcl.exeを実行することを推奨しましたが、これで問題は解決されませんでした。

  • 答えて

    2

    私はそれを稼働させることができましたが、他の誰かが同様の問題を抱えていた場合にはここで更新すると思いました。

    Visual Studio 15としてプロジェクトのジェネレータを選択する代わりに、実際にはVisual Studio 14 Win64を選択する必要があります。

    +0

    Visual Studio 2017を使用していますか?申し訳ありませんが、私は彼らの命名規則と混同しています – mr5

    関連する問題