Visual Studio 2005 compile error building opencv 2.1 from source (Bug #348)


Added by Roberto Orellana almost 15 years ago. Updated almost 13 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:build/install
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

OS: Microsoft Windows XP SP2 32 bit
Compiler: Visual Studio 2005 SP1
Error in file: cvinternal.h
Description: Compiler error when building cxcore project
Code. Possibly incorrect compiler version.:

#if defined +SSE2+ || _MSC_VER >= 1300
#include "emmintrin.h" 
#define CV_SSE 1
#define CV_SSE2 1
#if defined +SSE3+ || _MSC_VER >= 1400

changing to the following fixed the problem:

#if defined +SSE2+ || _MSC_VER >= 1300
#include "emmintrin.h" 
#define CV_SSE 1
#define CV_SSE2 1
#if defined +SSE3+ || _MSC_VER >= 1500

Associated revisions

Revision 3a9c978b
Added by Andrey Kamaev about 12 years ago

Merge pull request #348 from Daniil-Osokin:bugfix_YCrCb_formula

History

Updated by Scott Callaway almost 15 years ago

Hi Roberto,
I'm glad that you were able to get your code to compile by making the change; however, I believe that _MSC_VER = 1400 is correct for Visual Studio 2005.

The problem may be somewhere else.

The list I use for _MSC_VER is listed below.
_MSC_VER values:
1200 MSVC 6.0
1300 MSVC 7.0 Visual C++ .NET 2002
1310 Visual C++ .NET 2003
1400 Visual C++ 2005
1500 Visual C++ 2008
1600 Visual C++ 2010

Best regards, Scott

Updated by Roberto Orellana almost 15 years ago

Replying to [comment:1 sc_sd]:

Hi Roberto,
I'm glad that you were able to get your code to compile by making the change; however, I believe that _MSC_VER = 1400 is correct for Visual Studio 2005.

The problem may be somewhere else.

The list I use for _MSC_VER is listed below.
_MSC_VER values:
1200 MSVC 6.0
1300 MSVC 7.0 Visual C++ .NET 2002
1310 Visual C++ .NET 2003
1400 Visual C++ 2005
1500 Visual C++ 2008
1600 Visual C++ 2010

Best regards, Scott

Thanks for your reply but pmmintrin.h does not exist with VC 2005. I failed to mention that I was using the pro version of VS 2005. Is this compiler even supported?

-Regards, Roberto

Updated by Scott Callaway almost 15 years ago

Thanks for the clarification, I misunderstood. I think you are correct, this IS a problem for VS 2005 if this file does not exist.

I am using VS 2008, so I do not see this issue.
I am not an OpenCV developer; however, it appears VS 2005is supported (see url below). http://opencv.willowgarage.com/wiki/VisualC%2B%2B

I am using OpenCV 2.1.0 release -- and I see the code you have above ( r2997 src below) :
#if defined SSE2 || _MSC_VER >= 1300
#include "emmintrin.h"
#define CV_SSE 1
#define CV_SSE2 1
#if defined SSE3 || _MSC_VER >= 1400
#include "pmmintrin.h"
#define CV_SSE3 1
#endif
#else
#define CV_SSE 0
#define CV_SSE2 0
#define CV_SSE3 0
#endif

NOTE: the current SVN source has been re-factored and it appears that this file has been renamed and is not in the location below:
opencv\modules\core\include\opencv2\core\internal.hpp

Good luck, scott

Updated by Vadim Pisarevsky over 14 years ago

thanks! the problem is fixed in the current SVN version

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Updated by Andrey Kamaev almost 13 years ago

  • Category set to build/install
  • Assignee set to Vadim Pisarevsky

Also available in: Atom PDF