2017-03-25 10 views
1

Visual Studio 2015 Update 3でOpenCV 3.2とターゲットx64(単純なOpenCVアプリケーション)をビルドすると、3.2リリースではx86ライブラリはありません。次のエラー:VS2015アップデート3でOpenCV 3.2をビルドするときにxtr1commonのエラーが数多く発生する

1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(100): error C2737: 'std::is_same_v': 'constexpr' object must be initialized 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(100): error C2998: 'const bool std::is_same_v': cannot be a template definition 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(245): error C2737: 'std::is_integral_v': 'constexpr' object must be initialized 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(245): error C2998: 'const bool std::is_integral_v': cannot be a template definition 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(282): error C2737: 'std::is_floating_point_v': 'constexpr' object must be initialized 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(282): error C2998: 'const bool std::is_floating_point_v': cannot be a template definition 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(295): error C2737: 'std::is_arithmetic_v': 'constexpr' object must be initialized 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xtr1common(295): error C2998: 'const bool std::is_arithmetic_v': cannot be a template definition 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xstddef(697): error C2737: 'std::is_function_v': 'constexpr' object must be initialized 
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\xstddef(697): error C2998: 'const bool std::is_function_v': cannot be a template definition 

は、どういうわけか私は、これはOpenCVのに問題があると信じていけないので、私は、私は、ビルドプロセス中に何かが足りないか、誤って設定何かを持っていますね。どのような変更をすべきかを教えてください:)

VSを構成する方法については、次のサイトhttp://opencv-srf.blogspot.com/2013/05/installing-configuring-opencv-with-vs.htmlに従っています。

#include "opencv2/opencv.hpp" 

int main() 
{ 
    return 0; 
} 

OpenCV via NuGet packages with Visual Studio 2015, how to configure?で説明したようにNugetてOpenCVの3.1を追加するとき、私は同じエラーを取得:私はこれがないソースコードにビルドの構成に関連する何か、であると考えているものの

、ソースコードを追加します。面白いことに、まったく別のケースに見られるような類似のエラー - Visual Studio 2015: C++ REST API (Casablanca) failing compilation in VS inlcudes/headersと、RCから完全コミュニティ版にVS2015を再インストールすることで解決された場所のように見えます。私はVS2015 Enterprise Update 3を使用していますので、根本的な原因ではないことを願っています。

+0

あなたのコードを見ることなく、私たちが*何でも*答えると期待していますか?少なくとも[SSCCE](http://sscce.org)を投稿してください。 –

+0

ソースコードを追加しました;-) –

+0

'stdafx.h'を削除します。時には問題を引き起こすことがあります。 –

答えて

1

この問題は明らかにVS2015の問題が原因です。少なくとも私がVS2015のインストールを修理した後(WindowsでProgram and Featuresから問題がなくなった)

関連する問題