Errors with "emmintrin.h" file while setting up OpenCV 2.4.5 with visual C++ 2010 Express

I have installed the well-known open source library "OpenCV 2.4.5" with windows 7 Ultimate Service Pack 1 and Visual Studio 2008 many times and it worked without any problems.

Now I try for the first time to install the same OpenCV and Windows versions but with Visual C++ 2010 Express.

First, i had the error "cannot open include file "emmintrin.h" ", and i solved it by downloading "emmintrin.h" file from the Internt and addded it to the path: "C:\Program Files\Microsoft Visual Studio 10.0\VC\include".

But after adding "emmintrin.h" there were 49 syntax errors with "pmmintrin.h" and "tmmintrin" files.
Note: "emmintrin.h" file is included in "pmmintrin.h" file and "pmmintrin.h" is included in "tmmintrin.h".

Samples of the repeated error messages:

3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h(63): error C2146: syntax error : missing ';' before identifier '_mm_addsub_ps'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h(63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h(63): error C2146: syntax error : missing ')' before identifier 'a'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h(63): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\pmmintrin.h(63): error C2059: syntax error : ')'


3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h(36): error C2146: syntax error : missing ';' before identifier '_mm_hadd_epi16'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h(36): error C2146: syntax error : missing ')' before identifier 'a'
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h(36): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft Visual Studio 10.0\VC\include\tmmintrin.h(36): error C2059: syntax error : ')'


I think that i need another copy of "emmintrin.h" file
Anyone can help me pleeez??
First, i had the error "cannot open include file "emmintrin.h" ", and i solved it by downloading "emmintrin.h" file from the Internt and addded it to the path: "C:\Program Files\Microsoft Visual Studio 10.0\VC\include".
You shouldn't do that. Instead provide the path to the opencv headers:

http://stackoverflow.com/questions/335408/where-does-visual-studio-look-for-c-header-files
Topic archived. No new replies allowed.